summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-06-14 02:56:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:56 -0500
commit2074b4048556fbce65c8b0fefb33efa1e1944b85 (patch)
treef6a4e32df5c505431a6313d7c37aab654c273c1d
parent3542b99cf1408b075353efe1cbfb30569104dfba (diff)
downloadsamba-2074b4048556fbce65c8b0fefb33efa1e1944b85.tar.gz
samba-2074b4048556fbce65c8b0fefb33efa1e1944b85.tar.bz2
samba-2074b4048556fbce65c8b0fefb33efa1e1944b85.zip
r1124: ntlm_auth memory leak fixes by James Wilkinson - jwilk@alumni.cse.ucsc.edu
Andrew Bartlett (This used to be commit 94c0827ce20d8d1084703f6f5e4ad3b3c33151f8)
-rw-r--r--source3/utils/ntlm_auth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index f2fb7dcaaf..3b2164497c 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -369,6 +369,7 @@ NTSTATUS contact_winbind_auth_crap(const char *username,
nt_status = NT_STATUS_UNSUCCESSFUL;
if (error_string)
*error_string = smb_xstrdup("Reading winbind reply failed!");
+ free_response(&response);
return nt_status;
}
@@ -376,6 +377,7 @@ NTSTATUS contact_winbind_auth_crap(const char *username,
if (!NT_STATUS_IS_OK(nt_status)) {
if (error_string)
*error_string = smb_xstrdup(response.data.auth.error_string);
+ free_response(&response);
return nt_status;
}
@@ -390,10 +392,12 @@ NTSTATUS contact_winbind_auth_crap(const char *username,
if (flags & WBFLAG_PAM_UNIX_NAME) {
if (pull_utf8_allocate(unix_name, (char *)response.extra_data) == -1) {
+ free_response(&response);
return NT_STATUS_NO_MEMORY;
}
}
+ free_response(&response);
return nt_status;
}