From: Roland McGrath Date: Tue, 15 Jun 2004 20:04:37 +0000 (+0000) Subject: * stdio-common/psignal.c (psignal): Don't use BUF when asprintf X-Git-Tag: cvs/fedora-base~398 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d00189e10342ffa12aba5f4774f1dba7207ea04;p=thirdparty%2Fglibc.git * stdio-common/psignal.c (psignal): Don't use BUF when asprintf failed. --- diff --git a/ChangeLog b/ChangeLog index 4ff0520f3f3..be5ec8def8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-14 Andreas Schwab + + * stdio-common/psignal.c (psignal): Don't use BUF when asprintf + failed. + 2004-06-15 Steven Munroe * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Fix pasto diff --git a/stdio-common/psignal.c b/stdio-common/psignal.c index 3a75224b782..2e6588c6925 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); + } } }