diff options
Diffstat (limited to 'source/groupdb/groupdb.c')
-rw-r--r-- | source/groupdb/groupdb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/groupdb/groupdb.c b/source/groupdb/groupdb.c index 1f773d9f153..4b7795c57ba 100644 --- a/source/groupdb/groupdb.c +++ b/source/groupdb/groupdb.c @@ -138,16 +138,19 @@ DOMAIN_GRP *iterate_getgroupnam(char *name, DOMAIN_GRP_MEMBER **mem, int *num_me *************************************************************************/ BOOL add_domain_group(DOMAIN_GRP **grps, int *num_grps, DOMAIN_GRP *grp) { + DOMAIN_GRP *tgrps; + if (grps == NULL || num_grps == NULL || grp == NULL) { return False; } - (*grps) = Realloc((*grps), ((*num_grps)+1) * sizeof(DOMAIN_GRP)); - if ((*grps) == NULL) + tgrps = Realloc((*grps), ((*num_grps)+1) * sizeof(DOMAIN_GRP)); + if (tgrps == NULL) { return False; } + else (*grps) = tgrps; DEBUG(10,("adding group %s(%s)\n", grp->name, grp->comment)); |