summaryrefslogtreecommitdiffstats
path: root/source/groupdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-08-19 18:01:08 +0000
committerJeremy Allison <jra@samba.org>2001-08-19 18:01:08 +0000
commite4ef9e332fff99eb66101a3737a7efc3b7493cc5 (patch)
treedfee83d036105793d42025d38718c7ee37a4892d /source/groupdb
parent560ae7615eb8eca2c872b1196ce0b9534bf8ad76 (diff)
downloadsamba-e4ef9e332fff99eb66101a3737a7efc3b7493cc5.tar.gz
samba-e4ef9e332fff99eb66101a3737a7efc3b7493cc5.tar.xz
samba-e4ef9e332fff99eb66101a3737a7efc3b7493cc5.zip
Realloc fixes.
Jeremy.
Diffstat (limited to 'source/groupdb')
-rw-r--r--source/groupdb/aliasdb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/groupdb/aliasdb.c b/source/groupdb/aliasdb.c
index eed417a6990..eff318db0d0 100644
--- a/source/groupdb/aliasdb.c
+++ b/source/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));