Kaydet (Commit) 04d09ebd authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances.

üst 4aa86795
......@@ -2435,14 +2435,10 @@ fail:
if (saved_state) {
PyObject *type, *value, *traceback;
PyErr_Fetch(&type, &value, &traceback);
res = _PyObject_CallMethodId(self->decoder, &PyId_setstate, "(O)", saved_state);
_PyErr_ChainExceptions(type, value, traceback);
Py_DECREF(saved_state);
if (res == NULL)
return NULL;
Py_DECREF(res);
PyErr_Restore(type, value, traceback);
Py_XDECREF(res);
}
return NULL;
}
......
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