From: Zhanna Tsitkov Date: Thu, 28 Apr 2011 15:43:45 +0000 (+0000) Subject: Properly release resources in krb5_copy_authenticator() X-Git-Tag: krb5-1.10-alpha1~448 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c676adfb307b97e67c8c3538799f97a7cc19ebb0;p=krb5.git Properly release resources in krb5_copy_authenticator() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24904 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/copy_athctr.c b/src/lib/krb5/krb/copy_athctr.c index 81473d08e..9cc7b4c66 100644 --- a/src/lib/krb5/krb/copy_athctr.c +++ b/src/lib/krb5/krb/copy_athctr.c @@ -55,7 +55,6 @@ krb5_copy_authenticator(krb5_context context, const krb5_authenticator *authfrom if (authfrom->subkey) { retval = krb5_copy_keyblock(context, authfrom->subkey, &tempto->subkey); if (retval) { - free(tempto->subkey); krb5_free_checksum(context, tempto->checksum); krb5_free_principal(context, tempto->client); free(tempto); @@ -67,10 +66,9 @@ krb5_copy_authenticator(krb5_context context, const krb5_authenticator *authfrom retval = krb5_copy_authdata(context, authfrom->authorization_data, &tempto->authorization_data); if (retval) { - free(tempto->subkey); + krb5_free_keyblock(context, tempto->subkey); krb5_free_checksum(context, tempto->checksum); krb5_free_principal(context, tempto->client); - krb5_free_authdata(context, tempto->authorization_data); free(tempto); return retval; }