summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-12-03 19:33:25 (GMT)
committerGuido van Rossum <guido@python.org>2001-12-03 19:33:25 (GMT)
commitbb8f59a37148eb81ef1a1a26a6fb6e1e03583d12 (patch)
tree74f6920a0c94cd6522c8517bcf3ad003f52474e2 /Python/ceval.c
parent2009aa66b4900fc11224318333be4b560f0820ce (diff)
downloadcpython-bb8f59a37148eb81ef1a1a26a6fb6e1e03583d12.zip
cpython-bb8f59a37148eb81ef1a1a26a6fb6e1e03583d12.tar.gz
cpython-bb8f59a37148eb81ef1a1a26a6fb6e1e03583d12.tar.bz2
unpack_iterable(): Add a missing DECREF in an error case. Reported by
Armin Rigo (SF bug #488477). Added a testcase to test_unpack_iter() in test_iter.py.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index fd602b0..b41ef5a 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2796,6 +2796,7 @@ unpack_iterable(PyObject *v, int argcnt, PyObject **sp)
Py_DECREF(it);
return 1;
}
+ Py_DECREF(w);
PyErr_SetString(PyExc_ValueError, "too many values to unpack");
/* fall through */
Error: