Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-08-08 23:28:34 +0400
committerChristopher Faylor <me@cgf.cx>2003-08-08 23:28:34 +0400
commitb344f1876c90d48d2d0921a2ffcb6e374eafef67 (patch)
tree8a443a28b03297f226a800e3938ff87deb6b7d3e /winsup/cygwin
parent61bbf8b2b7cbfd8d97d8d17eaad58c9fec91d64c (diff)
* grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr after
free() is called.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/grp.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f79614038..39c3a6735 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index c83c1e55f..5b93ec74d 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -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");