From: Vincent Pit Date: Wed, 11 Mar 2015 00:41:08 +0000 (-0300) Subject: Add a couple of missing SvREFCNT_dec() after sv_magicext() X-Git-Tag: v0.56~7 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=b4686a74cf24411a7ae04fdef9b0f19a7a0234e0;p=perl%2Fmodules%2FVariable-Magic.git Add a couple of missing SvREFCNT_dec() after sv_magicext() --- diff --git a/Magic.xs b/Magic.xs index 5ca81e3..4c5cd5c 100644 --- a/Magic.xs +++ b/Magic.xs @@ -1434,6 +1434,7 @@ STATIC int vmg_svt_free_cleanup(pTHX_ void *ud_) { SV *guard = sv_newmortal(); sv_magicext(guard, errsv, PERL_MAGIC_ext, &vmg_propagate_errsv_vtbl, NULL, 0); + SvREFCNT_dec(errsv); } #else /* !VMG_PROPAGATE_ERRSV_NEEDS_TRAMPOLINE */ # if !VMG_HAS_PERL(5, 8, 9) @@ -1441,6 +1442,7 @@ STATIC int vmg_svt_free_cleanup(pTHX_ void *ud_) { SV *guard = sv_newmortal(); sv_magicext(guard, errsv, PERL_MAGIC_ext, &vmg_propagate_errsv_vtbl, NULL, 0); + SvREFCNT_dec(errsv); } # else sv_magicext(ERRSV, errsv, PERL_MAGIC_ext, &vmg_propagate_errsv_vtbl,