From cd6ed3f9f5ab14944f7c591a3dc9ca285b754a33 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 14 Sep 2001 03:01:47 +0000 Subject: * grp.cc (read_etc_group): Just reuse group_buf storage for subsequent reread of /etc/group. * passwd.cc (read_etc_passwd): Just reuse passwd_buf storage for subsequent reread of /etc/passwd. --- winsup/cygwin/passwd.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'winsup/cygwin/passwd.cc') diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index ed37e98ea..87ba9c672 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -137,8 +137,7 @@ read_etc_passwd () { for (int i = 0; i < curr_lines; ++i) free (passwd_buf[i].pw_name); - free (passwd_buf); - curr_lines = max_lines = 0; + curr_lines = 0; } FILE *f = fopen ("/etc/passwd", "rt"); -- cgit v1.2.3