From: Greg Hudson Date: Thu, 30 Aug 2012 17:08:34 +0000 (-0400) Subject: Fix memory leak in gss_add_cred X-Git-Tag: krb5-1.11-alpha1~205 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0b7eeb8ddb6fc3fde9bbebe9aa3069e7577e04c;p=thirdparty%2Fkrb5.git Fix memory leak in gss_add_cred The most recent commit to g_acquire_cred.c allocates an OID set to pass to the mech, but never releases it. Fix that. --- diff --git a/src/lib/gssapi/mechglue/g_acquire_cred.c b/src/lib/gssapi/mechglue/g_acquire_cred.c index d228a7731e..bdfd4643a4 100644 --- a/src/lib/gssapi/mechglue/g_acquire_cred.c +++ b/src/lib/gssapi/mechglue/g_acquire_cred.c @@ -540,6 +540,7 @@ gss_add_cred_from(minor_status, input_cred_handle, (void) gssint_release_internal_name(&temp_minor_status, &mech->mech_type, &allocated_name); + (void) generic_gss_release_oid_set(&temp_minor_status, &target_mechs); return (GSS_S_COMPLETE); @@ -560,5 +561,7 @@ errout: if (input_cred_handle == GSS_C_NO_CREDENTIAL && union_cred) free(union_cred); + (void) generic_gss_release_oid_set(&temp_minor_status, &target_mechs); + return (status); }