This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.10-379-g1a9e411


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  1a9e411e2aba14573ddc2ced4a5ee927a01031e0 (commit)
      from  cc88b371a5072242b76d80fae5483d1777029c71 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1a9e411e2aba14573ddc2ced4a5ee927a01031e0

commit 1a9e411e2aba14573ddc2ced4a5ee927a01031e0
Author: Joe Landers <jlanders@vmware.com>
Date:   Thu Oct 29 16:22:01 2009 -0700

    Fix memory leak in NIS grp database handling.

diff --git a/ChangeLog b/ChangeLog
index 15a753b..81defae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-10-29  Ulrich Drepper  <drepper@redhat.com>
 
+	[BZ #10713]
+	* nis/nss_nis/nis-grp.c (internal_nis_endgrent): Start freeing blocks
+	from intern.start.  Patch by Joe Landers <jlanders@vmware.com>.
+
 	[BZ #10780]
 	* libio/ioputs.c (_IO_puts): Make sure to not return a number which
 	overflows the int return type.
diff --git a/nis/nss_nis/nis-grp.c b/nis/nss_nis/nis-grp.c
index 6e36cf8..071d8a2 100644
--- a/nis/nss_nis/nis-grp.c
+++ b/nis/nss_nis/nis-grp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999, 2001-2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999,2001-2004,2006,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
 
@@ -55,7 +55,7 @@ internal_nis_endgrent (void)
       oldkeylen = 0;
     }
 
-  struct response_t *curr = intern.next;
+  struct response_t *curr = intern.start;
 
   while (curr != NULL)
     {
@@ -203,16 +203,16 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen,
 	}
 
       if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
-        {
-          free (result);
-          *errnop = ERANGE;
-          return NSS_STATUS_TRYAGAIN;
-        }
+	{
+	  free (result);
+	  *errnop = ERANGE;
+	  return NSS_STATUS_TRYAGAIN;
+	}
 
       char *p = strncpy (buffer, result, len);
       buffer[len] = '\0';
       while (isspace (*p))
-        ++p;
+	++p;
       if (!batch_read)
 	free (result);
 
@@ -280,7 +280,7 @@ _nss_nis_getgrnam_r (const char *name, struct group *grp,
       enum nss_status retval = yperr2nss (yperr);
 
       if (retval == NSS_STATUS_TRYAGAIN)
-        *errnop = errno;
+	*errnop = errno;
       return retval;
     }
 
@@ -329,7 +329,7 @@ _nss_nis_getgrgid_r (gid_t gid, struct group *grp,
       enum nss_status retval = yperr2nss (yperr);
 
       if (retval == NSS_STATUS_TRYAGAIN)
-        *errnop = errno;
+	*errnop = errno;
       return retval;
     }
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |    4 ++++
 nis/nss_nis/nis-grp.c |   20 ++++++++++----------
 2 files changed, 14 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]