sv_clear can manipulate the arena array directly too.
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index a3dee91..d9cb1d0 100644 (file)
--- a/op.c
+++ b/op.c
@@ -407,7 +407,7 @@ Perl_op_clear(pTHX_ OP *o)
 clear_pmop:
        {
            HV * const pmstash = PmopSTASH(cPMOPo);
-           if (pmstash && SvREFCNT(pmstash)) {
+           if (pmstash && !SvIS_FREED(pmstash)) {
                MAGIC * const mg = mg_find((SV*)pmstash, PERL_MAGIC_symtab);
                if (mg) {
                    PMOP *pmop = (PMOP*) mg->mg_obj;