mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
Realloc fixes.
Jeremy. (This used to be commit e4ef9e332fff99eb66101a3737a7efc3b7493cc5)
This commit is contained in:
parent
e077bcada9
commit
4f14ec2dd1
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user