summaryrefslogtreecommitdiffstats
path: root/source/groupdb/groupfile.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-08-19 17:54:10 +0000
committerJeremy Allison <jra@samba.org>2001-08-19 17:54:10 +0000
commit560ae7615eb8eca2c872b1196ce0b9534bf8ad76 (patch)
tree18d57f23a52b19adae9b8a30c6b68a99c8fc5cf6 /source/groupdb/groupfile.c
parent94128f9f372c23602c14cf13a79a24d01065ced1 (diff)
downloadsamba-560ae7615eb8eca2c872b1196ce0b9534bf8ad76.tar.gz
samba-560ae7615eb8eca2c872b1196ce0b9534bf8ad76.tar.xz
samba-560ae7615eb8eca2c872b1196ce0b9534bf8ad76.zip
Realloc fixes.
Jeremy.
Diffstat (limited to 'source/groupdb/groupfile.c')
-rw-r--r--source/groupdb/groupfile.c5
1 files changed, 3 insertions, 2 deletions
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;