useradd.c:fix memleaks of grp

Signed-off-by: whzhe51 <wanghongzhe@huawei.com>
This commit is contained in:
whzhe51 2020-12-19 04:29:06 -05:00
parent 599cc003da
commit c44b71cec2
1 changed files with 1 additions and 0 deletions

View File

@ -411,6 +411,7 @@ static void get_defaults (void)
} else {
def_group = grp->gr_gid;
def_gname = xstrdup (grp->gr_name);
gr_free(grp);
}
}