fix segfault when threadsv is used as foreach itervar
Stephen McCamant [Sun, 2 Aug 1998 21:44:34 +0000 (16:44 -0500)]
Message-Id: <13765.8641.997452.14516@alias-2.pr.mcs.net>
Subject: [PATCH] threadsv index in enteriter targ in op_free()

p4raw-id: //depot/maint-5.005/perl@1721

op.c

diff --git a/op.c b/op.c
index 9c4501c..421a093 100644 (file)
--- a/op.c
+++ b/op.c
@@ -582,6 +582,10 @@ op_free(OP *o)
        o->op_targ = 0; /* Was holding hints. */
        break;
 #ifdef USE_THREADS
+    case OP_ENTERITER:
+       if (!(o->op_flags & OPf_SPECIAL))
+           break;
+       /* FALL THROUGH */
     case OP_THREADSV:
        o->op_targ = 0; /* Was holding index into thr->threadsv AV. */
        break;