mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
[BZ #2998]
2006-08-03 Eric Blake <ebb9@byu.net> [BZ #2998] * misc/error.c (error_tail) [_LIBC]: Avoid invalid free.
This commit is contained in:
@ -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"???";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user