mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
nsswitch/winbind_nss_aix.c(fill_grent): fixed memory leak.
Found by cppcheck: [./nsswitch/winbind_nss_aix.c:241]: (error) Memory leak: result
This commit is contained in:
parent
4258750e4f
commit
95dbd7d6dc
@ -237,6 +237,9 @@ static struct group *fill_grent(struct winbindd_gr *gr, char *gr_mem)
|
||||
|
||||
result->gr_mem = (char **)malloc(sizeof(char *) * (gr->num_gr_mem+1));
|
||||
if (!result->gr_mem) {
|
||||
free(result->gr_name);
|
||||
free(result->gr_passwd);
|
||||
free(result);
|
||||
errno = ENOMEM;
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user