summaryrefslogtreecommitdiffstats
path: root/source/utils
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
commit94c0827ce20d8d1084703f6f5e4ad3b3c33151f8 (patch)
tree6e4d2eb7d8ae5ec58d242ee6267801ade77f1a38 /source/utils
parent9d5821d5ee5e9f666dfbe75419e97508af9cad5e (diff)
downloadsamba-94c0827ce20d8d1084703f6f5e4ad3b3c33151f8.tar.gz
samba-94c0827ce20d8d1084703f6f5e4ad3b3c33151f8.tar.xz
samba-94c0827ce20d8d1084703f6f5e4ad3b3c33151f8.zip
r1124: ntlm_auth memory leak fixes by James Wilkinson - jwilk@alumni.cse.ucsc.edu
Andrew Bartlett
Diffstat (limited to 'source/utils')
-rw-r--r--source/utils/ntlm_auth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/utils/ntlm_auth.c b/source/utils/ntlm_auth.c
index f2fb7dcaaf3..3b2164497cd 100644
--- a/source/utils/ntlm_auth.c
+++ b/source/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;
}