summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-12-01 15:04:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:17 -0500
commitef8d6bf5f700dcfeec7919203da9c357c4f21e3f (patch)
tree12cb666ab5a32967e6e318b99ef6b526647c2946 /source3
parente2bebe486550374978af200232334ddc7757ba8d (diff)
downloadsamba-ef8d6bf5f700dcfeec7919203da9c357c4f21e3f.tar.gz
samba-ef8d6bf5f700dcfeec7919203da9c357c4f21e3f.tar.bz2
samba-ef8d6bf5f700dcfeec7919203da9c357c4f21e3f.zip
r19979: Fix memleak on pw and change talloc_destroy to TALLOC_FREE for mem_ctx
(This used to be commit defa0a352b32469984126ec5d47aab9ef8d6b61c)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/sesssetup.c10
1 files changed, 7 insertions, 3 deletions
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 */
}