From: Barry Warsaw Date: Mon, 25 Aug 1997 22:30:51 +0000 (+0000) Subject: unpack_sequence(): In finally clause, watch out for Py_DECREF X-Git-Tag: v1.5a4~312 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=910105515ebe340fafe357f8fe1b898787a292a0;p=python unpack_sequence(): In finally clause, watch out for Py_DECREF evaluating its arguments twice. --- diff --git a/Python/ceval.c b/Python/ceval.c index e08e1c972f..c920d30a3a 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; }