diff options
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/fmtmsg.c | 5 | ||||
-rw-r--r-- | stdlib/tst-fmtmsg.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c index 2ab97b7d90..9e654c688e 100644 --- a/stdlib/fmtmsg.c +++ b/stdlib/fmtmsg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1999,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1999,2000-2003,2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -324,9 +324,6 @@ internal_addseverity (int severity, const char *string) if (runp != NULL) { - /* Release old string. */ - free ((char *) runp->string); - if (string != NULL) /* Change the string. */ runp->string = string; diff --git a/stdlib/tst-fmtmsg.c b/stdlib/tst-fmtmsg.c index d5369bda62..0b244e2bc0 100644 --- a/stdlib/tst-fmtmsg.c +++ b/stdlib/tst-fmtmsg.c @@ -48,5 +48,11 @@ main (void) != MM_OK) result = 1; + if (addseverity (MM_TEST, NULL) != MM_OK) + { + puts ("second addseverity failed"); + result = 1; + } + return result; } |