summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cop.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cop.h b/cop.h
index 48f9d5b2e4..359abd61ff 100644
--- a/cop.h
+++ b/cop.h
@@ -520,6 +520,9 @@ struct block_loop {
sv_2mortal(*s_v_p); \
*s_v_p = cx->blk_loop.itersave; \
} \
+ else { \
+ SvREFCNT_dec(cx->blk_loop.itersave); \
+ } \
} \
if (CxTYPE(cx) == CXt_LOOP_FOR) \
SvREFCNT_dec(cx->blk_loop.state_u.ary.ary);