From 560ae7615eb8eca2c872b1196ce0b9534bf8ad76 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 19 Aug 2001 17:54:10 +0000 Subject: Realloc fixes. Jeremy. --- source/groupdb/groupfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/groupdb/groupfile.c') diff --git a/source/groupdb/groupfile.c b/source/groupdb/groupfile.c index ba9027b4f61..124da186fab 100644 --- a/source/groupdb/groupfile.c +++ b/source/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; -- cgit