summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-08-30 13:08:34 -0400
committerGreg Hudson <ghudson@mit.edu>2012-08-30 13:08:34 -0400
commitb0b7eeb8ddb6fc3fde9bbebe9aa3069e7577e04c (patch)
tree6d1c070f72f9cd15fd359a2dad326e0912aefafd /src/lib
parent932866ad41edf830123bdfef927f1314f3100be9 (diff)
downloadkrb5-b0b7eeb8ddb6fc3fde9bbebe9aa3069e7577e04c.tar.gz
krb5-b0b7eeb8ddb6fc3fde9bbebe9aa3069e7577e04c.tar.xz
krb5-b0b7eeb8ddb6fc3fde9bbebe9aa3069e7577e04c.zip
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.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/gssapi/mechglue/g_acquire_cred.c3
1 files changed, 3 insertions, 0 deletions
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);
}