Merge pull request #93 from rahul1809/master

Double freeing up pointers , Causing Segmentation fault
This commit is contained in:
Serge Hallyn 2018-02-19 14:45:13 -06:00 committed by GitHub
commit 5f3e3c2c62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,7 +290,8 @@ static int add_group (const char *name, const char *gid, gid_t *ngid, uid_t uid)
fprintf (stderr,
_("%s: invalid group name '%s'\n"),
Prog, grent.gr_name);
free (grent.gr_name);
if (grent.gr_name)
free (grent.gr_name);
return -1;
}