summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;