diff options
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r-- | Objects/abstract.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 2fe6b1f..30e6191 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1220,8 +1220,10 @@ PySequence_Tuple(PyObject *v) n += 10; else n += 100; - if (_PyTuple_Resize(&result, n, 0) != 0) + if (_PyTuple_Resize(&result, n, 0) != 0) { + Py_DECREF(item); goto Fail; + } } PyTuple_SET_ITEM(result, j, item); } |