summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-03 08:45:28 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-03 08:45:28 +0000
commitf350b448ae021c71a4662e0a5bb0b3454004be98 (patch)
treeb064e81bc133300ac6e0070e4b2688a3d4f200bb
parent557b887a4219c4f375c8d0bd3219fb4da7bbc7ff (diff)
downloadperl-f350b448ae021c71a4662e0a5bb0b3454004be98.tar.gz
PL_mess_sv is always >= SVt_PVMG, so no need for an if() test
p4raw-id: //depot/perl@24373
-rw-r--r--perl.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/perl.c b/perl.c
index 81f3690302..afd2255d7f 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));