summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-30 22:35:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:02 -0500
commitce3c830f15ec4afad40753f3a35f4bad6c360c8c (patch)
tree43ae4edec5f135ef039c8862fffcbd91c9727983 /source3/nsswitch
parent261c004d7bf85de945a1a3956c1d8f15075bc224 (diff)
downloadsamba-ce3c830f15ec4afad40753f3a35f4bad6c360c8c.tar.gz
samba-ce3c830f15ec4afad40753f3a35f4bad6c360c8c.tar.bz2
samba-ce3c830f15ec4afad40753f3a35f4bad6c360c8c.zip
r22015: Fix for memory leak from Steven Danneman <steven.danneman@isilon.com>
Jeremy. (This used to be commit 61a1574f50d35435a55de62fa6f1d281eed90a25)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_ads.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index d5426f40ba..8391a985fc 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -931,6 +931,8 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
if (num_retries < 5) {
num_retries++;
num_members = 0;
+ ads_msgfree(ads, res);
+ res = NULL;
continue;
} else {
DEBUG(5, ("ads: lookup_groupmem USN on this record changed"
@@ -947,6 +949,9 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
&num_members,
&more_values);
+ ads_msgfree(ads, res);
+ res = NULL;
+
if ((members == NULL) || (num_members == 0))
break;