aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-01-14 09:06:25 +0000
committerUlrich Drepper <drepper@redhat.com>2005-01-14 09:06:25 +0000
commitea161661142ab98568ea811ce791da538da981d1 (patch)
tree79da250397aa476ac4eec1bbe2108b01e039014e /stdlib
parent3e539cb47e9fabfdda295926b4270b0f3cc7fa65 (diff)
downloadglibc-ea161661142ab98568ea811ce791da538da981d1.tar
glibc-ea161661142ab98568ea811ce791da538da981d1.tar.gz
glibc-ea161661142ab98568ea811ce791da538da981d1.tar.bz2
glibc-ea161661142ab98568ea811ce791da538da981d1.zip
Update.
2005-01-14 Ulrich Drepper <drepper@redhat.com> * posix/regcomp.c [!_LIBC] (init_dfa): Fix determining of relevant LC_* variable. Patch by Aharon Robbins <arnold@skeeve.com>. * stdlib/fmtmsg.c (internal_addseverity): Remove incorrect free call. * stdlib/tst-fmtmsg.c (main): Add another addseverity test.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/fmtmsg.c5
-rw-r--r--stdlib/tst-fmtmsg.c6
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;
}