diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-08-21 21:28:18 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-08-21 21:28:18 +0100 |
commit | 59d8e2ce29a35e6a471501e81a266a06df49dd05 (patch) | |
tree | 01777d7a42db0b9e576b270d286b9707893e5db7 /ext/mro | |
parent | 17eef65c2fb9a95edf9064575d3413b4ec8219b7 (diff) | |
download | perl-59d8e2ce29a35e6a471501e81a266a06df49dd05.tar.gz |
Eliminate SV leak in mro::_nextcan - hv_store_ent()'s "key" doesn't take a ref.
Diffstat (limited to 'ext/mro')
-rw-r--r-- | ext/mro/mro.xs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mro/mro.xs b/ext/mro/mro.xs index 92be620787..6fb37fb3e4 100644 --- a/ext/mro/mro.xs +++ b/ext/mro/mro.xs @@ -633,14 +633,14 @@ mro__nextcan(...) valid for the child */ if (SvTYPE(candidate) == SVt_PVGV && (cand_cv = GvCV(candidate)) && !GvCVGEN(candidate)) { SvREFCNT_inc_simple_void_NN(MUTABLE_SV(cand_cv)); - (void)hv_store_ent(nmcache, newSVsv(sv), MUTABLE_SV(cand_cv), 0); + (void)hv_store_ent(nmcache, sv, MUTABLE_SV(cand_cv), 0); mXPUSHs(newRV_inc(MUTABLE_SV(cand_cv))); XSRETURN(1); } } } - (void)hv_store_ent(nmcache, newSVsv(sv), &PL_sv_undef, 0); + (void)hv_store_ent(nmcache, sv, &PL_sv_undef, 0); if(throw_nomethod) Perl_croak(aTHX_ "No next::method '%s' found for %s", subname, hvname); XSRETURN_EMPTY; |