Commit 42dfb029 authored by Jeremy Hylton's avatar Jeremy Hylton

Correct check of PyUnicode_Resize() return value.

parent b0b3acfc
......@@ -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;
}
......
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