diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2006-04-12 01:08:40 +0300 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-04-11 19:47:15 +0000 |
commit | 56279a21118d1d29a1b0c13e8567361057bbd7f9 (patch) | |
tree | baa7e9ec4f9c6e67f7413d73257e880b0795e1ea /locale.c | |
parent | cbb1fbeae87953fd0cb732e37262675ddbb9ffdd (diff) | |
download | perl-56279a21118d1d29a1b0c13e8567361057bbd7f9.tar.gz |
locale.c: more Safefree() (Coverity finding)
Message-Id: <200604111908.k3BJ8ewn030950@kosh.hut.fi>
Date: Tue, 11 Apr 2006 22:08:40 +0300 (EEST)
p4raw-id: //depot/perl@27769
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -284,6 +284,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn) } if (!setlocale_failure) { #ifdef USE_LOCALE_CTYPE + Safefree(curctype); if (! (curctype = setlocale(LC_CTYPE, (!done && (lang || PerlEnv_getenv("LC_CTYPE"))) @@ -293,6 +294,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn) curctype = savepv(curctype); #endif /* USE_LOCALE_CTYPE */ #ifdef USE_LOCALE_COLLATE + Safefree(curcoll); if (! (curcoll = setlocale(LC_COLLATE, (!done && (lang || PerlEnv_getenv("LC_COLLATE"))) @@ -302,6 +304,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn) curcoll = savepv(curcoll); #endif /* USE_LOCALE_COLLATE */ #ifdef USE_LOCALE_NUMERIC + Safefree(curnum); if (! (curnum = setlocale(LC_NUMERIC, (!done && (lang || PerlEnv_getenv("LC_NUMERIC"))) @@ -458,12 +461,15 @@ Perl_init_i18nl10n(pTHX_ int printwarn) #endif /* ! LC_ALL */ #ifdef USE_LOCALE_CTYPE + Safefree(curctype); curctype = savepv(setlocale(LC_CTYPE, NULL)); #endif /* USE_LOCALE_CTYPE */ #ifdef USE_LOCALE_COLLATE + Safefree(curcoll); curcoll = savepv(setlocale(LC_COLLATE, NULL)); #endif /* USE_LOCALE_COLLATE */ #ifdef USE_LOCALE_NUMERIC + Safefree(curnum); curnum = savepv(setlocale(LC_NUMERIC, NULL)); #endif /* USE_LOCALE_NUMERIC */ } |