From cb01c8e192f24dd4ef5af6f04ef31707090fe5fa Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Dec 2001 07:11:26 +0000 Subject: fixed another leak - memory usage now seems to be quite small (This used to be commit a45e3968590a021c1b464db5265a09ba48cb5797) --- source3/nsswitch/winbindd_ads.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index 9420c75f58..524593feda 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -461,6 +461,8 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, user_dn = ads_pull_string(ads, mem_ctx, msg, "distinguishedName"); + if (msg) ads_msgfree(ads, msg); + rc = ads_search_dn(ads, &msg, user_dn, attrs2); if (rc) { DEBUG(1,("lookup_usergroups(rid=%d) ads_search tokenGroups: %s\n", user_rid, ads_errstr(rc))); -- cgit