Correct check of PyUnicode_Resize() return value.

This commit is contained in:
Jeremy Hylton 2003-09-16 03:17:16 +00:00
parent 1aad9c7dad
commit 364f6becad

View file

@ -2381,7 +2381,8 @@ filterunicode(PyObject *func, PyObject *strobj)
to avoid reallocations */
if (need < 2 * outlen)
need = 2 * outlen;
if (PyUnicode_Resize(&result, need)) {
if (PyUnicode_Resize(
&result, need) < 0) {
Py_DECREF(item);
goto Fail_1;
}