summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-05-07 09:22:16 -0400
committerSteffen Mueller <smueller@cpan.org>2014-05-28 19:27:21 +0200
commit0ac78434bf60027f078daa1108d6c7bcec1ad6e4 (patch)
tree080e5810565725efda4fc8b1b4765fe81a9f063e /locale.c
parentc5e9a8e7dadb9fc0aed0209af0d2dd2fcce6e64a (diff)
downloadperl-0ac78434bf60027f078daa1108d6c7bcec1ad6e4.tar.gz
Leaked string in failure path.
Fix for Coverity perl5 CID 29058: Resource leak (RESOURCE_LEAK) leaked_storage: Variable codeset going out of scope leaks the storage it points to. The savepv-ed codeset was not freed in failure path. (The save_input_locale is freed just few lines later.)
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/locale.c b/locale.c
index 66524e6919..56cac8528b 100644
--- a/locale.c
+++ b/locale.c
@@ -1077,6 +1077,7 @@ S_is_cur_LC_category_utf8(pTHX_ int category)
Safefree(save_input_locale);
return is_utf8;
}
+ Safefree(codeset);
}
# endif