GNU C Library master sources branch, master, updated. glibc-2.11-396-gf297602

drepper@sourceware.org drepper@sourceware.org
Mon May 3 20:33:00 GMT 2010


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  f2976023940a8ef3bbe0c7e593897e1b612370f1 (commit)
      from  49bd556d43f55d0bb6d76d57e846af85f0c986c9 (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=f2976023940a8ef3bbe0c7e593897e1b612370f1

commit f2976023940a8ef3bbe0c7e593897e1b612370f1
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Mon May 3 13:33:13 2010 -0700

    Simplify OOM handling in ldconfig.

diff --git a/ChangeLog b/ChangeLog
index 85ab183..d332b32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2010-05-03  Ulrich Drepper  <drepper@redhat.com>
 
+	* elf/chroot_canon.c (chroot_canon): Use xmalloc and xrealloc.
+
 	* elf/ldconfig.c (parse_conf_include): Don't fall back to
 	directories named in config file outside the chroot.
 
diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c
index 3c16a43..54a6a4c 100644
--- a/elf/chroot_canon.c
+++ b/elf/chroot_canon.c
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file inside chroot.
-   Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005
+   Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -58,9 +58,7 @@ chroot_canon (const char *chroot, const char *name)
       return NULL;
     }
 
-  rpath = malloc (chroot_len + PATH_MAX);
-  if (rpath == NULL)
-    return NULL;
+  rpath = xmalloc (chroot_len + PATH_MAX);
 
   rpath_limit = rpath + chroot_len + PATH_MAX;
 
@@ -109,9 +107,7 @@ chroot_canon (const char *chroot, const char *name)
 		new_size += end - start + 1;
 	      else
 		new_size += PATH_MAX;
-	      new_rpath = (char *) realloc (rpath, new_size);
-	      if (new_rpath == NULL)
-		goto error;
+	      new_rpath = (char *) xrealloc (rpath, new_size);
 	      rpath = new_rpath;
 	      rpath_limit = rpath + new_size;
 

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

Summary of changes:
 ChangeLog          |    2 ++
 elf/chroot_canon.c |   10 +++-------
 2 files changed, 5 insertions(+), 7 deletions(-)


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



More information about the Glibc-cvs mailing list