Commit 72f455e9 authored by Christian Heimes's avatar Christian Heimes

Fix use of uninitialized scalar variable, see 3f994367a979

CID 1058763
parent 49e52f93
...@@ -210,8 +210,10 @@ iobase_finalize(PyObject *self) ...@@ -210,8 +210,10 @@ iobase_finalize(PyObject *self)
/* If `closed` doesn't exist or can't be evaluated as bool, then the /* If `closed` doesn't exist or can't be evaluated as bool, then the
object is probably in an unusable state, so ignore. */ object is probably in an unusable state, so ignore. */
res = PyObject_GetAttr(self, _PyIO_str_closed); res = PyObject_GetAttr(self, _PyIO_str_closed);
if (res == NULL) if (res == NULL) {
PyErr_Clear(); PyErr_Clear();
closed = -1;
}
else { else {
closed = PyObject_IsTrue(res); closed = PyObject_IsTrue(res);
Py_DECREF(res); Py_DECREF(res);
......
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