Kaydet (Commit) 03e667d1 authored tarafından Ezio Melotti's avatar Ezio Melotti

Fix memory leak introduced in 15190138d3f3.

üst d4725f3f
......@@ -1423,11 +1423,15 @@ test_widechar(PyObject *self)
if (wide == NULL)
return NULL;
PyUnicode_AS_UNICODE(wide)[0] = invalid[0];
if (_PyUnicode_Ready(wide) < 0)
if (_PyUnicode_Ready(wide) < 0) {
Py_DECREF(wide);
PyErr_Clear();
else
}
else {
Py_DECREF(wide);
return raiseTestError("test_widechar",
"PyUnicode_Ready() didn't fail");
}
#endif
Py_RETURN_NONE;
......
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