aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Landers <jlanders@vmware.com>2009-06-15 17:37:40 -0700
committerUlrich Drepper <drepper@redhat.com>2009-06-15 17:37:40 -0700
commit233a182b9ee2a48eddbb15f70af8bc24add24af3 (patch)
tree1a645d32ac17d71b1daf6708a85ee5d64b79bc97
parent4155d926336ba38428a98359bf0908453ff83625 (diff)
downloadglibc-233a182b9ee2a48eddbb15f70af8bc24add24af3.tar
glibc-233a182b9ee2a48eddbb15f70af8bc24add24af3.tar.gz
glibc-233a182b9ee2a48eddbb15f70af8bc24add24af3.tar.bz2
glibc-233a182b9ee2a48eddbb15f70af8bc24add24af3.zip
Fix memory leak when batch-reading large NIS password maps.
Not the whole was traversed in the function to free all buffers. BZ #10203
-rw-r--r--ChangeLog5
-rw-r--r--nis/nss_nis/nis-pwd.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 402b5cb3e2..2bfa774655 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-06-15 Ulrich Drepper <drepper@redhat.com>
+ [BZ #10203]
+ * nis/nss_nis/nis-pwd.c (internal_nis_endpwent): Free all buffers,
+ not just the currently used one and those which follow.
+ Patch by Joe Landers <jlanders@vmware.com>.
+
[BZ #10196]
* libio/tst-fgetwc.c (do_test): Use de_DE.UTF-8 as locale name.
Patch by Bruce Dubbs <bdubbs@linuxfromscratch.org>.
diff --git a/nis/nss_nis/nis-pwd.c b/nis/nss_nis/nis-pwd.c
index 1b5206ad6d..fdc7dc9e1e 100644
--- a/nis/nss_nis/nis-pwd.c
+++ b/nis/nss_nis/nis-pwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1998,2001-2003,2006,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
@@ -116,7 +116,7 @@ internal_nis_endpwent (void)
oldkeylen = 0;
}
- struct response_t *curr = intern.next;
+ struct response_t *curr = intern.start;
while (curr != NULL)
{