From c44b71cec25d60efc51aec9de3abce1f6efbfcf5 Mon Sep 17 00:00:00 2001 From: whzhe51 Date: Sat, 19 Dec 2020 04:29:06 -0500 Subject: [PATCH] useradd.c:fix memleaks of grp Signed-off-by: whzhe51 --- src/useradd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/useradd.c b/src/useradd.c index 107e65f8..29c54e44 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -411,6 +411,7 @@ static void get_defaults (void) } else { def_group = grp->gr_gid; def_gname = xstrdup (grp->gr_name); + gr_free(grp); } }