diff options
author | Rafael Garcia-Suarez <rgs@consttype.org> | 2014-02-19 15:41:51 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2014-02-19 15:42:18 +0100 |
commit | 8a50cd03a18f63853c30d77231f3eed37cdf7efa (patch) | |
tree | d6258e0e1b02b4ebd31707e5a6e5ebfcdeb03549 /hv.c | |
parent | b79bb8373d09257612fa6517489b425bf5c77fcb (diff) | |
download | perl-8a50cd03a18f63853c30d77231f3eed37cdf7efa.tar.gz |
Do not dereference hv before ensuring it's not NULL
This should fix RT #116441 and possibly other bugs.
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1753,10 +1753,11 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags) { dVAR; XPVHV* xhv; - const bool save = !!SvREFCNT(hv); + bool save; if (!hv) return; + save = !!SvREFCNT(hv); DEBUG_A(Perl_hv_assert(aTHX_ hv)); xhv = (XPVHV*)SvANY(hv); |