shadow-utils/shadow-4.9-revert-useradd-fix-memleak.patch
Iker Pedrosa 4b31c38f8e - getsubids: provide system binary and man page
- useradd: generate home and mail directories with selinux user attribute
- useradd: revert fix memleak of grp
- groupdel: fix SIGSEGV when passwd does not exist
- pwck: fix segfault when calling fprintf()
- newgrp: fix segmentation fault
- Clean spec file: organize dependencies and move License location

Resolves: #2013015
Resolves: #1993081
Resolves: #2020238
Resolves: #2024834

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2021-12-02 13:25:52 +01:00

31 lines
709 B
Diff

From 4624e9fca1b02b64e25e8b2280a0186182ab73ba Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serge@hallyn.com>
Date: Sat, 14 Aug 2021 19:37:24 -0500
Subject: [PATCH] Revert "useradd.c:fix memleaks of grp"
In some cases, the value which was being freed is not actually
safe to free.
Closes #394
This reverts commit c44b71cec25d60efc51aec9de3abce1f6efbfcf5.
---
src/useradd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/useradd.c b/src/useradd.c
index f90127cd..0d3f390d 100644
--- a/src/useradd.c
+++ b/src/useradd.c
@@ -413,7 +413,6 @@ static void get_defaults (void)
} else {
def_group = grp->gr_gid;
def_gname = xstrdup (grp->gr_name);
- gr_free(grp);
}
}
--
2.31.1