summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-08-25 22:30:51 (GMT)
committerBarry Warsaw <barry@python.org>1997-08-25 22:30:51 (GMT)
commit910105515ebe340fafe357f8fe1b898787a292a0 (patch)
tree804f74d26feeec505f49894fbcb19a26bb41249f /Python/ceval.c
parent09f9547393770d5b305ee217b1b650402662beda (diff)
downloadcpython-910105515ebe340fafe357f8fe1b898787a292a0.zip
cpython-910105515ebe340fafe357f8fe1b898787a292a0.tar.gz
cpython-910105515ebe340fafe357f8fe1b898787a292a0.tar.bz2
unpack_sequence(): In finally clause, watch out for Py_DECREF
evaluating its arguments twice.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index e08e1c9..c920d30 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2076,8 +2076,8 @@ unpack_sequence(v, argcnt, sp)
"unpack sequence of wrong size");
/* fall through */
finally:
- for (; i > 0; i--)
- Py_DECREF(*sp++);
+ for (; i > 0; i--, sp++)
+ Py_DECREF(*sp);
return 0;
}