From f9a06dc1b5f83ddd6448c6bf80dfe9e02eb97a3d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Apr 2004 18:58:56 +0000 Subject: Update. 2004-04-20 Jakub Jelinek * sysdeps/unix/sysv/linux/shm_open.c (shm_unlink): Change EPERM into EACCES. 2004-04-20 Jakub Jelinek * stdio-common/vfscanf.c (_IO_vfscanf): Revert last %% whitespace handling change. * stdio-common/tst-sscanf.c (int_tests): Adjust. * nis/nss-nis.c: Include stdlib.h. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Shut up a warning. * sysdeps/sparc/sparc64/memcmp.S (memcmp): Remove BP_SYM () from libc_hidden_builtin_def. 2004-04-20 Jim Meyering * misc/error.c (error_tail): Don't leak upon realloc failure. 2004-04-20 Martin Schwidefsky * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): Use RETURN_ADDRESS instead of __builtin_return_address. --- misc/error.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'misc') diff --git a/misc/error.c b/misc/error.c index de3b797a40..2501583366 100644 --- a/misc/error.c +++ b/misc/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in /gd/gnu/lib. @@ -192,18 +192,19 @@ error_tail (int status, int errnum, const char *message, va_list args) if (wmessage != NULL && len / 2 < ALLOCA_LIMIT) wmessage = NULL; - wmessage = (wchar_t *) realloc (wmessage, - len * sizeof (wchar_t)); - - if (wmessage == NULL) + wchar_t *p = (wchar_t *) realloc (wmessage, + len * sizeof (wchar_t)); + if (p == NULL) { + free (wmessage); fputws_unlocked (L"out of memory\n", stderr); return; } + wmessage = p; } memset (&st, '\0', sizeof (st)); - tmp =message; + tmp = message; } while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len); -- cgit v1.2.3