From c676adfb307b97e67c8c3538799f97a7cc19ebb0 Mon Sep 17 00:00:00 2001 From: Zhanna Tsitkov Date: Thu, 28 Apr 2011 15:43:45 +0000 Subject: [PATCH] Properly release resources in krb5_copy_authenticator() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24904 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/copy_athctr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; } -- 2.26.2