aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/grp.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-08-08 19:28:34 +0000
committerChristopher Faylor <me@cgf.cx>2003-08-08 19:28:34 +0000
commitb344f1876c90d48d2d0921a2ffcb6e374eafef67 (patch)
tree8a443a28b03297f226a800e3938ff87deb6b7d3e /winsup/cygwin/grp.cc
parent61bbf8b2b7cbfd8d97d8d17eaad58c9fec91d64c (diff)
downloadnewlib-b344f1876c90d48d2d0921a2ffcb6e374eafef67.zip
newlib-b344f1876c90d48d2d0921a2ffcb6e374eafef67.tar.gz
newlib-b344f1876c90d48d2d0921a2ffcb6e374eafef67.tar.bz2
* grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr after
free() is called.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r--winsup/cygwin/grp.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index c83c1e5..5b93ec7 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");