]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix memory leak when batch-reading large NIS password maps.
authorJoe Landers <jlanders@vmware.com>
Tue, 16 Jun 2009 00:37:40 +0000 (17:37 -0700)
committerPetr Baudis <pasky@suse.cz>
Tue, 16 Jun 2009 10:21:55 +0000 (12:21 +0200)
Not the whole was traversed in the function to free all buffers.
BZ #10203
(cherry picked from commit 233a182b9ee2a48eddbb15f70af8bc24add24af3)

ChangeLog
nis/nss_nis/nis-pwd.c

index f7ac9ecb4bf4030b7bf4346a87bba4321e6b9d25..c999607cbbd78e2cdd367e3089cf4109b5b431fc 100644 (file)
--- 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>.
index 1b5206ad6d682ef833fae3eb54340be78a791bf7..fdc7dc9e1e17a203c673c47e617b50dd17f75885 100644 (file)
@@ -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)
     {