summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/sesssetup.c1
-rw-r--r--source3/smbd/smb2_sesssetup.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index a561e3a593..9d0c68512c 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -504,6 +504,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
DEBUG(10, ("found user %s in passdb, calling "
"make_server_info_sam\n", real_username));
ret = make_server_info_sam(&server_info, sampass);
+ TALLOC_FREE(sampass);
} else {
/*
* User not in passdb, make it up artificially
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 7ac003fad6..d8972156a1 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -345,6 +345,7 @@ static NTSTATUS smbd_smb2_session_setup_krb5(struct smbd_smb2_session *session,
DEBUG(10, ("smb2: found user %s in passdb, calling "
"make_server_info_sam\n", real_username));
status = make_server_info_sam(&tmp_server_info, sampass);
+ TALLOC_FREE(sampass);
} else {
/*
* User not in passdb, make it up artificially