]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
useradd.c:fix memleaks of grp 302/head
authorwhzhe51 <whzhe51@126.com>
Sat, 19 Dec 2020 09:29:06 +0000 (04:29 -0500)
committerwhzhe51 <whzhe51@126.com>
Mon, 21 Dec 2020 01:14:49 +0000 (20:14 -0500)
Signed-off-by: whzhe51 <wanghongzhe@huawei.com>
src/useradd.c

index 107e65f8503d9404a639c0d3822a15e075a96d45..29c54e44cbf9fa7feaa60298dcc4bdb91d7dfd09 100644 (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);
                        }
                }