summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-05-27 12:27:57 -0700
committerJeremy Allison <jra@samba.org>2008-05-27 12:27:57 -0700
commitd5d4a9511d763cc4a63d3020c5537e852da2ed4c (patch)
treee841f6e52138764259a7d9a9f5dc06a172aa4fb3 /source3
parent6811dc3fc236e62f042e43efa500cc55346c29d6 (diff)
downloadsamba-d5d4a9511d763cc4a63d3020c5537e852da2ed4c.tar.gz
samba-d5d4a9511d763cc4a63d3020c5537e852da2ed4c.tar.bz2
samba-d5d4a9511d763cc4a63d3020c5537e852da2ed4c.zip
Memory leak fixes from Chere Zhou <czhou@isilon.com>.
Jeremy. (This used to be commit 201bcc8ed291b51be6f4508c6aa1cb17ce6dcbe3)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/kerberos.c4
-rw-r--r--source3/libsmb/smbencrypt.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 2adf6a4700..c4135f24a1 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -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);
}
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index f339b6b9f6..a8a88a8a7e 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -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;
}