1
0
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:
Slava Semushin 2009-05-23 21:02:40 +07:00 committed by Volker Lendecke
parent 4258750e4f
commit 95dbd7d6dc

View File

@ -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;
}