summaryrefslogtreecommitdiff
path: root/source3/auth/check_samsec.c
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-05-27 05:31:45 -0400
committerGünther Deschner <gd@samba.org>2010-05-28 00:56:02 +0200
commit606be25ecf4a31cba9f15c43ebc650aecb17e765 (patch)
treec29aceb4a80f7d08feb9ed71b76af8a1b0068261 /source3/auth/check_samsec.c
parentd9cffc01be58184312a6a7b55bd523cf8daefa78 (diff)
downloadsamba-606be25ecf4a31cba9f15c43ebc650aecb17e765.tar.gz
samba-606be25ecf4a31cba9f15c43ebc650aecb17e765.tar.bz2
samba-606be25ecf4a31cba9f15c43ebc650aecb17e765.zip
s3:auth Free sampass as soon as we have server_info
We don't keep sampass in server_info anymore So it makes no sense to keep it around. Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/auth/check_samsec.c')
-rw-r--r--source3/auth/check_samsec.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/auth/check_samsec.c b/source3/auth/check_samsec.c
index db2bde7bbc..ef29df4d56 100644
--- a/source3/auth/check_samsec.c
+++ b/source3/auth/check_samsec.c
@@ -484,11 +484,8 @@ NTSTATUS check_sam_security(const DATA_BLOB *challenge,
become_root();
nt_status = make_server_info_sam(server_info, sampass);
unbecome_root();
- /*
- * sampass has been stolen to server_info.
- * So NULL it out to prevent segfaults.
- */
- sampass = NULL;
+
+ TALLOC_FREE(sampass);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("check_sam_security: make_server_info_sam() failed with '%s'\n", nt_errstr(nt_status)));