]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* stdio-common/psignal.c (psignal): Don't use BUF when asprintf
authorRoland McGrath <roland@gnu.org>
Tue, 15 Jun 2004 20:04:37 +0000 (20:04 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 15 Jun 2004 20:04:37 +0000 (20:04 +0000)
failed.

ChangeLog
stdio-common/psignal.c

index 4ff0520f3f3d511c7bf5f1c04e23c2e6d97257bc..be5ec8def8f288961f068b1050a2a18d34bd1205 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-14  Andreas Schwab  <schwab@suse.de>
+
+       * stdio-common/psignal.c (psignal): Don't use BUF when asprintf
+       failed.
+
 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
 
        * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Fix pasto
index 3a75224b7820f07d05562e123ec286feef087e7f..2e6588c6925b977b8c4b7b02e69428f20bf6c5b1 100644 (file)
@@ -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);
+       }
     }
 }