summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/groupfile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/groupdb/groupfile.c b/source3/groupdb/groupfile.c
index ba9027b4f6..124da186fa 100644
--- a/source3/groupdb/groupfile.c
+++ b/source3/groupdb/groupfile.c
@@ -131,8 +131,9 @@ static char *get_group_members(char *p, int *num_mem, DOMAIN_GRP_MEMBER **member
DOMAIN_GRP_MEMBER *mbrs;
mbrs = Realloc((*members), ((*num_mem)+1) * sizeof(DOMAIN_GRP_MEMBER));
- if (mbrs == NULL)
- {
+ if (mbrs == NULL) {
+ if (*members)
+ free(*members);
return NULL;
}
else (*members) = mbrs;