This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Call SvMAGICAL_off in mg_free
[perl5.git] / mg.c
diff --git a/mg.c b/mg.c
index 25abdce..f3e6ae9 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -532,6 +532,7 @@ Perl_mg_free(pTHX_ SV *sv)
        SvMAGIC_set(sv, moremagic);
     }
     SvMAGIC_set(sv, NULL);
+    SvMAGICAL_off(sv);
     return 0;
 }