summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-11-27 03:34:56 +0000
committerAndrew Tridgell <tridge@samba.org>2001-11-27 03:34:56 +0000
commit6cf3434785ec369f6edbd5b1dd4dd1c26123b7c1 (patch)
treea1ba73c99061ce03afe351b1202c05f7213eae2e
parent28c118c4749f2e6719dd037411a8178d7a1fa13c (diff)
downloadsamba-6cf3434785ec369f6edbd5b1dd4dd1c26123b7c1.tar.gz
samba-6cf3434785ec369f6edbd5b1dd4dd1c26123b7c1.tar.bz2
samba-6cf3434785ec369f6edbd5b1dd4dd1c26123b7c1.zip
more memory leak fixes
(This used to be commit 5abf8442033587b79651301d39260abd44b1c3fa)
-rw-r--r--source3/smbd/sesssetup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index d49dbc15d1..ac8ba91ff7 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -59,6 +59,7 @@ static NTSTATUS check_guest_password(auth_serversupplied_info **server_info)
nt_status = check_password(user_info, auth_info, server_info);
free_auth_info(&auth_info);
+ SAFE_FREE(user_info);
return nt_status;
}
@@ -279,7 +280,7 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
DATA_BLOB blob1)
{
DATA_BLOB auth;
- char *workgroup, *user, *machine;
+ char *workgroup = NULL, *user = NULL, *machine = NULL;
DATA_BLOB lmhash, nthash, sess_key;
DATA_BLOB plaintext_password = data_blob(NULL, 0);
uint32 ntlmssp_command, neg_flags;
@@ -329,6 +330,10 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
neg_flags, True)) {
return ERROR_NT(NT_STATUS_NO_MEMORY);
}
+
+ SAFE_FREE(workgroup);
+ SAFE_FREE(user);
+ SAFE_FREE(machine);
nt_status = check_password(user_info, ntlmssp_auth_info, &server_info);