Memory leak fixes from Chere Zhou <czhou@isilon.com>.
authorJeremy Allison <jra@samba.org>
Tue, 27 May 2008 19:27:57 +0000 (12:27 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 27 May 2008 19:27:57 +0000 (12:27 -0700)
Jeremy.
(This used to be commit 201bcc8ed291b51be6f4508c6aa1cb17ce6dcbe3)

source3/libads/kerberos.c
source3/libsmb/smbencrypt.c

index 2adf6a4700ee0f415c60d9b2831211dfe23b212d..c4135f24a1caba5e793c1d7be00cb23eb3d44681 100644 (file)
@@ -649,6 +649,10 @@ bool kerberos_secrets_store_salting_principal(const char *service,
        SAFE_FREE(princ_s);
        SAFE_FREE(unparsed_name);
 
+       if (princ) {
+               krb5_free_principal(context, princ);
+       }
+
        if (context) {
                krb5_free_context(context);
        }
index f339b6b9f6937b96de64337c38aa607075efaefa..a8a88a8a7e452d6a8432a9b78d2905c049282186 100644 (file)
@@ -181,6 +181,7 @@ bool ntv2_owf_gen(const uchar owf[16],
        if (!push_ucs2_allocate(&domain, domain_in, &domain_byte_len)) {
                DEBUG(0, ("push_uss2_allocate() for domain failed: %s\n",
                          strerror(errno)));
+               SAFE_FREE(user);
                return False;
        }