OSDN Git Service

* grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr after
authorcgf <cgf>
Fri, 8 Aug 2003 19:28:34 +0000 (19:28 +0000)
committercgf <cgf>
Fri, 8 Aug 2003 19:28:34 +0000 (19:28 +0000)
free() is called.

winsup/cygwin/ChangeLog
winsup/cygwin/grp.cc

index f796140..39c3a67 100644 (file)
@@ -1,3 +1,8 @@
+2003-08-08  David Rothenberger  <daveroth@acm.org>
+
+       * grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr
+       after free() is called.
+
 2003-08-05  Christopher Faylor  <cgf@redhat.com>
 
        * Makefile.in: Rework to accommodate new speclib arguments.
index c83c1e5..5b93ec7 100644 (file)
@@ -75,7 +75,10 @@ pwdgrp::read_group ()
 {
   for (int i = 0; i < gr.curr_lines; i++)
     if ((*group_buf)[i].gr_mem != &null_ptr)
-      free ((*group_buf)[i].gr_mem);
+      {
+        free ((*group_buf)[i].gr_mem);
+        (*group_buf)[i].gr_mem = &null_ptr;
+      }
 
   load ("/etc/group");