]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix leak in gss_acquire_cred_with_password
authorGreg Hudson <ghudson@mit.edu>
Fri, 19 Jun 2015 21:16:52 +0000 (17:16 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 9 Dec 2015 19:54:10 +0000 (14:54 -0500)
The target_mechs array needs to be freed on successful return.

(cherry picked from commit 02a85d73c4548d27dcbc1c1681b4bf1370b03632)

ticket: 8304 (new)
version_fixed: 1.12.5
status: resolved

src/lib/gssapi/mechglue/g_acquire_cred_with_pw.c

index f290f8a5608c47a37b26258f705a7d5062a4b471..7835d59726d3576d89159187ebcc68203f96128b 100644 (file)
@@ -496,6 +496,9 @@ gss_add_cred_with_password(minor_status, input_cred_handle,
                                            selected_mech,
                                           &allocated_name);
 
+    if (target_mechs)
+       (void)gss_release_oid_set(&temp_minor_status, &target_mechs);
+
     return (GSS_S_COMPLETE);
 
 errout: