From ef8d6bf5f700dcfeec7919203da9c357c4f21e3f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 1 Dec 2006 15:04:53 +0000 Subject: r19979: Fix memleak on pw and change talloc_destroy to TALLOC_FREE for mem_ctx (This used to be commit defa0a352b32469984126ec5d47aab9ef8d6b61c) --- source3/smbd/sesssetup.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 8c8173ef37..ae6dd49663 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -335,7 +335,8 @@ static int reply_spnego_kerberos(connection_struct *conn, SAFE_FREE(client); data_blob_free(&ap_rep); data_blob_free(&session_key); - talloc_destroy(mem_ctx); + TALLOC_FREE(mem_ctx); + TALLOC_FREE(pw); return ERROR_NT(nt_status_squash(ret)); } @@ -348,7 +349,8 @@ static int reply_spnego_kerberos(connection_struct *conn, SAFE_FREE(client); data_blob_free(&ap_rep); data_blob_free(&session_key); - talloc_destroy(mem_ctx); + TALLOC_FREE(mem_ctx); + TALLOC_FREE(pw); return ERROR_NT(nt_status_squash(ret)); } @@ -372,6 +374,7 @@ static int reply_spnego_kerberos(connection_struct *conn, SAFE_FREE(client); data_blob_free(&ap_rep); data_blob_free(&session_key); + TALLOC_FREE(pw); TALLOC_FREE( mem_ctx ); TALLOC_FREE( server_info ); return ERROR_NT(nt_status_squash(ret)); @@ -415,7 +418,8 @@ static int reply_spnego_kerberos(connection_struct *conn, data_blob_free(&ap_rep); data_blob_free(&ap_rep_wrapped); data_blob_free(&response); - talloc_destroy(mem_ctx); + TALLOC_FREE(mem_ctx); + TALLOC_FREE(pw); return -1; /* already replied */ } -- cgit