mirror of https://github.com/python/cpython
PyUnicode_Resize() doesn't free its argument in case of a failure,
so we can jump to the error handling code that does. (Spotted by Neal Norwitz)
This commit is contained in:
parent
903f1e0c40
commit
531e000d2e
|
@ -2028,7 +2028,7 @@ filterunicode(PyObject *func, PyObject *strobj)
|
|||
need = 2*outlen;
|
||||
if (PyUnicode_Resize(&result, need)) {
|
||||
Py_DECREF(item);
|
||||
return NULL;
|
||||
goto Fail_1;
|
||||
}
|
||||
outlen = need;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue