summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 40f8d1d696..3ac2fd8d3e 100644
--- a/sv.c
+++ b/sv.c
@@ -6056,6 +6056,7 @@ Perl_sv_clear(pTHX_ SV *const orig_sv)
sv_unmagic(sv, PERL_MAGIC_backref);
mg_free(sv);
}
+ SvMAGICAL_off(sv);
if (type == SVt_PVMG && SvPAD_TYPED(sv))
SvREFCNT_dec(SvSTASH(sv));
}