summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/sesssetup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c
index 01d170aec7..7b4c217b8f 100644
--- a/source4/smb_server/sesssetup.c
+++ b/source4/smb_server/sesssetup.c
@@ -128,9 +128,6 @@ static NTSTATUS sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *s
status = auth_context->check_ntlm_password(auth_context,
user_info,
&server_info);
-
- free_auth_context(&auth_context);
-
} else {
TALLOC_CTX *mem_ctx = talloc_init("NT1 session setup");
char *remote_machine;
@@ -165,6 +162,8 @@ static NTSTATUS sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *s
return nt_status_squash(status);
}
+ talloc_steal(session_info, server_info);
+
sess->nt1.out.action = 0;
sess->nt1.out.vuid = smbsrv_register_session(req->smb_conn, session_info, NULL);
if (sess->nt1.out.vuid == UID_FIELD_INVALID) {