From d62f60f53ac18b3de9c7922105c6796361b91a11 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 27 Feb 2003 01:05:12 +0000 Subject: Fix possible memory leak on failure. (This used to be commit 052ebc44cde8d31571ed1edb602794349825be11) --- source3/nsswitch/winbindd_ads.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index 6c79e59bae..de3757aa44 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -580,6 +580,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, user_dn = ads_pull_string(ads, mem_ctx, msg, "distinguishedName"); if (!user_dn) { DEBUG(1,("lookup_usergroups(sid=%s) ads_search did not return a a distinguishedName!\n", sid_to_string(sid_string, sid))); + if (msg) ads_msgfree(ads, msg); goto done; } -- cgit