summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}