From: Yuval Kogman Date: Fri, 21 Dec 2007 00:13:31 +0000 (+0200) Subject: mg_free frees data but leaves it accessible X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c826f41b69925b8dedc613995e7dbb5bc467e6a4;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/mg.c b/mg.c index 4a6c689..f341f23 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;