From 6d00189e10342ffa12aba5f4774f1dba7207ea04 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Jun 2004 20:04:37 +0000 Subject: * stdio-common/psignal.c (psignal): Don't use BUF when asprintf failed. --- stdio-common/psignal.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'stdio-common/psignal.c') diff --git a/stdio-common/psignal.c b/stdio-common/psignal.c index 3a75224b78..2e6588c692 100644 --- a/stdio-common/psignal.c +++ b/stdio-common/psignal.c @@ -64,12 +64,14 @@ psignal (int sig, const char *s) else (void) fprintf (stderr, "%s%s%s\n", s, colon, _("Unknown signal")); } - - if (_IO_fwide (stderr, 0) > 0) - (void) __fwprintf (stderr, L"%s", buf); else - (void) fputs (buf, stderr); + { + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", buf); + else + (void) fputs (buf, stderr); - free (buf); + free (buf); + } } } -- cgit v1.2.1