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.
This commit is contained in:
Tim Peters 2001-05-05 04:10:25 +00:00
parent 6912d4ddf0
commit 12d0a6c78a
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}