diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-17 11:39:06 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-17 11:39:06 +0000 |
commit | aa2f79cfd781fa0bd9e0fcec607dd31150743daa (patch) | |
tree | 0ec4a9598fc3e6e543e911380e7047f34c5d3bc2 /pad.c | |
parent | 61c5492ade04e0e4885f062e63c9f5d91f769541 (diff) | |
download | perl-aa2f79cfd781fa0bd9e0fcec607dd31150743daa.tar.gz |
In Perl_cv_undef(), only check potential pads against PL_comppad
Don't even try checking the address of the pad name AV against PL_comppad, and
don't try checking the address of pad AVs against PL_comppad_name. Neither will
ever match.
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -363,16 +363,20 @@ Perl_cv_undef(pTHX_ CV *cv) } ix = AvFILLp(padlist); - while (ix >= 0) { + while (ix > 0) { SV* const sv = AvARRAY(padlist)[ix--]; if (sv) { - if (sv == (const SV *)PL_comppad_name) - PL_comppad_name = NULL; - else if (sv == (const SV *)PL_comppad) { + if (sv == (const SV *)PL_comppad) { PL_comppad = NULL; PL_curpad = NULL; } + SvREFCNT_dec(sv); } + } + { + SV *const sv = AvARRAY(padlist)[0]; + if (sv == (const SV *)PL_comppad_name) + PL_comppad_name = NULL; SvREFCNT_dec(sv); } SvREFCNT_dec(MUTABLE_SV(CvPADLIST(cv))); |