]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
Add a couple of missing SvREFCNT_dec() after sv_magicext()
authorVincent Pit <vince@profvince.com>
Wed, 11 Mar 2015 00:41:08 +0000 (21:41 -0300)
committerVincent Pit <vince@profvince.com>
Wed, 11 Mar 2015 00:41:08 +0000 (21:41 -0300)
Magic.xs

index 5ca81e35766050b99b966877a513d6eb32420903..4c5cd5cb5c37e60648ec0650f8db4d18b7133210 100644 (file)
--- 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,