summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libshouldbeinlibc/ChangeLog5
-rw-r--r--libshouldbeinlibc/idvec-impgids.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/libshouldbeinlibc/ChangeLog b/libshouldbeinlibc/ChangeLog
index 40f24732..359b0d77 100644
--- a/libshouldbeinlibc/ChangeLog
+++ b/libshouldbeinlibc/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-12 Marcus Brinkmann <marcus@gnu.org>
+
+ * idvec-impgids.c (_merge_implied_gids): Free CACHE on failure.
+ Submitted by Neal H Walfield <neal@cs.uml.edu>.
+
2002-05-08 Roland McGrath <roland@frob.com>
* portinfo.c (print_port_info): Use %z formats for port names.
diff --git a/libshouldbeinlibc/idvec-impgids.c b/libshouldbeinlibc/idvec-impgids.c
index 21e6af1d..66f82e21 100644
--- a/libshouldbeinlibc/idvec-impgids.c
+++ b/libshouldbeinlibc/idvec-impgids.c
@@ -84,7 +84,11 @@ _merge_implied_gids (struct idvec *implied_gids, uid_t uid)
if (! cache)
err = ENOMEM;
else
- err = idvec_add_new (cache, pw->pw_gid);
+ {
+ err = idvec_add_new (cache, pw->pw_gid);
+ if (err)
+ idvec_free (cache);
+ }
#endif
if (! err)