From: Nicholas Clark Date: Tue, 3 May 2005 08:45:28 +0000 (+0000) Subject: PL_mess_sv is always >= SVt_PVMG, so no need for an if() test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f350b448ae021c71a4662e0a5bb0b3454004be98;p=p5sagit%2Fp5-mst-13.2.git PL_mess_sv is always >= SVt_PVMG, so no need for an if() test p4raw-id: //depot/perl@24373 --- diff --git a/perl.c b/perl.c index 81f3690..afd2255 100644 --- a/perl.c +++ b/perl.c @@ -944,18 +944,19 @@ perl_destruct(pTHXx) /* As the absolutely last thing, free the non-arena SV for mess() */ if (PL_mess_sv) { + /* we know that type == SVt_PVMG */ + /* it could have accumulated taint magic */ - if (SvTYPE(PL_mess_sv) >= SVt_PVMG) { - MAGIC* mg; - MAGIC* moremagic; - for (mg = SvMAGIC(PL_mess_sv); mg; mg = moremagic) { - moremagic = mg->mg_moremagic; - if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global - && mg->mg_len >= 0) - Safefree(mg->mg_ptr); - Safefree(mg); - } + MAGIC* mg; + MAGIC* moremagic; + for (mg = SvMAGIC(PL_mess_sv); mg; mg = moremagic) { + moremagic = mg->mg_moremagic; + if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global + && mg->mg_len >= 0) + Safefree(mg->mg_ptr); + Safefree(mg); } + /* we know that type >= SVt_PV */ SvPV_free(PL_mess_sv); Safefree(SvANY(PL_mess_sv));