This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5e9a8e
)
Leaked string in failure path.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Wed, 7 May 2014 13:22:16 +0000
(09:22 -0400)
committer
Steffen Mueller
<smueller@cpan.org>
Wed, 28 May 2014 17:27:21 +0000
(19:27 +0200)
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.)
locale.c
patch
|
blob
|
blame
|
history
diff --git
a/locale.c
b/locale.c
index
66524e6
..
56cac85
100644
(file)
--- 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