From: Jarkko Hietaniemi Date: Sun, 9 Apr 2006 10:31:32 +0000 (+0300) Subject: Re: [PATCH] locale.c: Coverity finding X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6cb43dbf7021a8e1f9508dae05534be11e07948d;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] locale.c: Coverity finding Message-ID: <4438B854.6040301@gmail.com> p4raw-id: //depot/perl@27750 --- diff --git a/locale.c b/locale.c index dd3060f..f9b2c93 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