summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mg.c b/mg.c
index 4a6c6896aa..f341f233fe 100644
--- a/mg.c
+++ b/mg.c
@@ -497,6 +497,7 @@ Perl_mg_free(pTHX_ SV *sv)
if (mg->mg_flags & MGf_REFCOUNTED)
SvREFCNT_dec(mg->mg_obj);
Safefree(mg);
+ SvMAGIC_set(sv, moremagic);
}
SvMAGIC_set(sv, NULL);
return 0;