aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-08-12 17:49:50 +0000
committerUlrich Drepper <drepper@redhat.com>2006-08-12 17:49:50 +0000
commit9a5288841e99925426b7967ffade7c5ca5a874f4 (patch)
tree8e792d1eb93f9476535bacb997c79bc99b0215aa
parent0c1c6c6c08cefd87654d3c28d4f904be57732e62 (diff)
downloadglibc-9a5288841e99925426b7967ffade7c5ca5a874f4.zip
glibc-9a5288841e99925426b7967ffade7c5ca5a874f4.tar.gz
glibc-9a5288841e99925426b7967ffade7c5ca5a874f4.tar.bz2
[BZ #2998]
2006-08-03 Eric Blake <ebb9@byu.net> [BZ #2998] * misc/error.c (error_tail) [_LIBC]: Avoid invalid free.
-rw-r--r--ChangeLog5
-rw-r--r--misc/error.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a356c15..68faa19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-03 Eric Blake <ebb9@byu.net>
+
+ [BZ #2998]
+ * misc/error.c (error_tail) [_LIBC]: Avoid invalid free.
+
2006-08-09 Ulrich Drepper <drepper@redhat.com>
* malloc/memusagestat.c: Silence warnings.
diff --git a/misc/error.c b/misc/error.c
index 66a8ccb..459110c 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -224,7 +224,10 @@ error_tail (int status, int errnum, const char *message, va_list args)
{
/* The string cannot be converted. */
if (use_malloc)
- free (wmessage);
+ {
+ free (wmessage);
+ use_malloc = false;
+ }
wmessage = (wchar_t *) L"???";
}