From b344f1876c90d48d2d0921a2ffcb6e374eafef67 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 8 Aug 2003 19:28:34 +0000 Subject: * grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr after free() is called. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/grp.cc | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f796140..39c3a67 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-08-08 David Rothenberger + + * grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr + after free() is called. + 2003-08-05 Christopher Faylor * Makefile.in: Rework to accommodate new speclib arguments. 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"); -- cgit v1.1