Commit 12d0a6c7 authored by Tim Peters's avatar Tim Peters

Fix a tiny and unlikely memory leak. Was there before too, and actually

several of these turned up and got fixed during the iteration crusade.
parent 6912d4dd
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment