]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix memory leak in gss_add_cred
authorGreg Hudson <ghudson@mit.edu>
Thu, 30 Aug 2012 17:08:34 +0000 (13:08 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 30 Aug 2012 17:08:34 +0000 (13:08 -0400)
The most recent commit to g_acquire_cred.c allocates an OID set to
pass to the mech, but never releases it.  Fix that.

src/lib/gssapi/mechglue/g_acquire_cred.c

index d228a7731e66e18d8afc572ac1a803e5edc40016..bdfd4643a4c231d6d9c72c973606dbfebe5b6cb8 100644 (file)
@@ -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);
 }