This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Use safer code practice
authorKarl Williamson <khw@cpan.org>
Fri, 11 Jul 2014 21:54:38 +0000 (15:54 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 12 Jul 2014 14:41:14 +0000 (08:41 -0600)
commit4f72bb37d82e7b97d8480ac800e3937d38084e18
tree3079a5ba58c49753600097a903dfbf517d706d4f
parent0080c90acf59b31e586bcf1d964eaf3d4220e8a5
locale.c: Use safer code practice

The interior-most function can return NULL.  Currently savepv() which is
the next outer function handles this correctly, as does the next outer
function, but it is dangerous to rely on that behavior.  So we test for
NULL before calling functions on a NULL ptr.
locale.c