r10945: Free the salt after we are done with it. May need a merge to similar
authorAndrew Bartlett <abartlet@samba.org>
Wed, 12 Oct 2005 22:24:43 +0000 (22:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:39:44 +0000 (13:39 -0500)
code in Samba3.

Andrew Bartlett
(This used to be commit 36e302bac87d0a07c86cc4c841d376c778630dab)

source4/auth/kerberos/clikrb5.c

index 85d60a1244b4ac2b924680c70194d511d4e008cc..eff558a37b97ba9959f8aad5ee816c97a9d387b5 100644 (file)
                DEBUG(1,("krb5_get_pw_salt failed (%s)\n", error_message(ret)));
                return ret;
        }
-       return krb5_string_to_key_salt(context, enctype, password->data,
-               salt, key);
+       ret = krb5_string_to_key_salt(context, enctype, password->data,
+                                     salt, key);
+       krb5_free_salt(context, salt);
+       return ret;
 }
 #else
 #error UNKNOWN_CREATE_KEY_FUNCTIONS