From: Christian Heimes Date: Tue, 30 Jul 2013 23:33:50 +0000 (+0200) Subject: Fix use of uninitialized scalar variable, see 3f994367a979 X-Git-Tag: v3.4.0a1~37^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72f455e96cba2ce446aeb1a07aafa0a549a4a90d;p=thirdparty%2FPython%2Fcpython.git Fix use of uninitialized scalar variable, see 3f994367a979 CID 1058763 --- diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c index a4f2c0e917d7..ae188dd7fe2d 100644 --- a/Modules/_io/iobase.c +++ b/Modules/_io/iobase.c @@ -210,8 +210,10 @@ iobase_finalize(PyObject *self) /* If `closed` doesn't exist or can't be evaluated as bool, then the object is probably in an unusable state, so ignore. */ res = PyObject_GetAttr(self, _PyIO_str_closed); - if (res == NULL) + if (res == NULL) { PyErr_Clear(); + closed = -1; + } else { closed = PyObject_IsTrue(res); Py_DECREF(res);