summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-20 09:41:55 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:13 +0100
commitd555f6d789ede9879f2b5d07d5c00199622ffe5a (patch)
treeb3815f86a0d99115b7f291997efa14ce051cfdb8 /source3/winbindd
parentb229d1dcb324c3da9d0865bd72a07e9e1b8b0c53 (diff)
downloadsamba-d555f6d789ede9879f2b5d07d5c00199622ffe5a.tar.gz
samba-d555f6d789ede9879f2b5d07d5c00199622ffe5a.tar.bz2
samba-d555f6d789ede9879f2b5d07d5c00199622ffe5a.zip
winbind: Don't leak memory on return.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_cm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 9fdd058ddb..289b9b275b 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1013,6 +1013,9 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
if ( !(*cli)->domain[0] ) {
result = cli_set_domain((*cli), domain->name);
if (!NT_STATUS_IS_OK(result)) {
+ SAFE_FREE(ipc_username);
+ SAFE_FREE(ipc_domain);
+ SAFE_FREE(ipc_password);
return result;
}
}