Commit 531e000d authored by Walter Dörwald's avatar Walter Dörwald

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)
parent 903f1e0c
...@@ -2028,7 +2028,7 @@ filterunicode(PyObject *func, PyObject *strobj) ...@@ -2028,7 +2028,7 @@ filterunicode(PyObject *func, PyObject *strobj)
need = 2*outlen; need = 2*outlen;
if (PyUnicode_Resize(&result, need)) { if (PyUnicode_Resize(&result, need)) {
Py_DECREF(item); Py_DECREF(item);
return NULL; goto Fail_1;
} }
outlen = need; outlen = need;
} }
......
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