diff options
author | Jeremy Allison <jra@samba.org> | 2001-08-19 18:01:08 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-08-19 18:01:08 +0000 |
commit | 4f14ec2dd1c908be0984dda2dfcafff25e4fe944 (patch) | |
tree | 6af9e2d52d87aa7b994c5fa7841e0de361113e50 /source3 | |
parent | e077bcada95f8c7d788d60fa37e9e483ad6f7665 (diff) | |
download | samba-4f14ec2dd1c908be0984dda2dfcafff25e4fe944.tar.gz samba-4f14ec2dd1c908be0984dda2dfcafff25e4fe944.tar.bz2 samba-4f14ec2dd1c908be0984dda2dfcafff25e4fe944.zip |
Realloc fixes.
Jeremy.
(This used to be commit e4ef9e332fff99eb66101a3737a7efc3b7493cc5)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/groupdb/aliasdb.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/groupdb/aliasdb.c b/source3/groupdb/aliasdb.c index eed417a699..eff318db0d 100644 --- a/source3/groupdb/aliasdb.c +++ b/source3/groupdb/aliasdb.c @@ -143,16 +143,15 @@ BOOL add_domain_alias(LOCAL_GRP **alss, int *num_alss, LOCAL_GRP *als) LOCAL_GRP *talss; if (alss == NULL || num_alss == NULL || als == NULL) - { return False; - } talss = Realloc((*alss), ((*num_alss)+1) * sizeof(LOCAL_GRP)); - if (talss == NULL) - { + if (talss == NULL) { + if (*alss) + free(*alss); return False; - } - else (*alss) = talss; + } else + (*alss) = talss; DEBUG(10,("adding alias %s(%s)\n", als->name, als->comment)); |