diff options
author | Christopher Faylor <me@cgf.cx> | 2001-09-14 03:01:47 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-09-14 03:01:47 +0000 |
commit | cd6ed3f9f5ab14944f7c591a3dc9ca285b754a33 (patch) | |
tree | 27c8d56472d600043f627049563f0e32c8865323 /winsup/cygwin/passwd.cc | |
parent | e2e078278cc951344fc5c0a976715bd1fe11f2d8 (diff) | |
download | newlib-cd6ed3f9f5ab14944f7c591a3dc9ca285b754a33.zip newlib-cd6ed3f9f5ab14944f7c591a3dc9ca285b754a33.tar.gz newlib-cd6ed3f9f5ab14944f7c591a3dc9ca285b754a33.tar.bz2 |
* 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.
Diffstat (limited to 'winsup/cygwin/passwd.cc')
-rw-r--r-- | winsup/cygwin/passwd.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index ed37e98..87ba9c6 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"); |