summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-05-11 22:46:27 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-05-11 22:46:27 +0000
commitd293dd2c6101daa4ef2fbdd56e7fee71c96ba741 (patch)
tree67cf04d026149548f9957ed635b696a3c7fa71a2
parentecd85d031588a3221cd9f8e329c891e52a92c8de (diff)
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>.
-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)