mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
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.
This commit is contained in:
parent
2009aa66b4
commit
bb8f59a371
2 changed files with 24 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue