Skip to content

Commit

Permalink
[BZ #2998]
Browse files Browse the repository at this point in the history
2006-08-03  Eric Blake
<ebb9@byu.net>

	[BZ #2998]
	* misc/error.c (error_tail) [_LIBC]: Avoid invalid free.
  • Loading branch information
Ulrich Drepper committed Aug 12, 2006
1 parent 0c1c6c6 commit 9a52888
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 5 additions & 2 deletions misc/error.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"???";
}

Expand Down

0 comments on commit 9a52888

Please sign in to comment.