summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-04-09 13:31:32 +0300
committerSteve Peters <steve@fisharerojo.org>2006-04-09 18:55:07 +0000
commit6cb43dbf7021a8e1f9508dae05534be11e07948d (patch)
tree8ecc1480ed1f3ed29d9cdb600ff347975c199fc4 /locale.c
parent3881461aa7ea7d04f800c042497ae7c44c5a670d (diff)
downloadperl-6cb43dbf7021a8e1f9508dae05534be11e07948d.tar.gz
Re: [PATCH] locale.c: Coverity finding
Message-ID: <4438B854.6040301@gmail.com> p4raw-id: //depot/perl@27750
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/locale.c b/locale.c
index dd3060f2a6..f9b2c9350c 100644
--- a/locale.c
+++ b/locale.c
@@ -323,18 +323,21 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
if (!setlocale_failure) {
#ifdef USE_LOCALE_CTYPE
+ Safefree(curctype);
if (! (curctype = setlocale(LC_CTYPE, "")))
setlocale_failure = TRUE;
else
curctype = savepv(curctype);
#endif /* USE_LOCALE_CTYPE */
#ifdef USE_LOCALE_COLLATE
+ Safefree(curcoll);
if (! (curcoll = setlocale(LC_COLLATE, "")))
setlocale_failure = TRUE;
else
curcoll = savepv(curcoll);
#endif /* USE_LOCALE_COLLATE */
#ifdef USE_LOCALE_NUMERIC
+ Safefree(curnum);
if (! (curnum = setlocale(LC_NUMERIC, "")))
setlocale_failure = TRUE;
else