summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorYuval Kogman <nothingmuch@woobling.org>2007-12-21 02:13:31 +0200
committerNicholas Clark <nick@ccl4.org>2007-12-21 10:21:45 +0000
commitc826f41b69925b8dedc613995e7dbb5bc467e6a4 (patch)
tree91ca732db909b2a8c64d6c9784985f79a006f9ca /mg.c
parent5e2a19fce2ec9f25e93c18dd5bfeb8f6d08a4fce (diff)
downloadperl-c826f41b69925b8dedc613995e7dbb5bc467e6a4.tar.gz
mg_free frees data but leaves it accessible
Message-ID: <20071220221331.GG10631@woobling.org> Date: Fri, 21 Dec 2007 00:13:31 +0200 p4raw-id: //depot/perl@32686
Diffstat (limited to 'mg.c')
-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;