2006-08-03 Eric Blake <ebb9@byu.net> [BZ #2998] * misc/error.c (error_tail) [_LIBC]: Avoid invalid free. --- libc/misc/error.c 28 Jul 2005 21:42:37 -0000 1.38 +++ libc/misc/error.c 12 Aug 2006 17:57:29 -0000 1.39 @@ -224,7 +224,10 @@ error_tail (int status, int errnum, cons { /* The string cannot be converted. */ if (use_malloc) - free (wmessage); + { + free (wmessage); + use_malloc = false; + } wmessage = (wchar_t *) L"???"; }