[Python-checkins] cpython: Fix use of uninitialized scalar variable, see 3f994367a979
christian.heimes
python-checkins at python.org
Wed Jul 31 01:34:00 CEST 2013
http://hg.python.org/cpython/rev/fca77bc5bdb8
changeset: 84924:fca77bc5bdb8
user: Christian Heimes <christian at cheimes.de>
date: Wed Jul 31 01:33:50 2013 +0200
summary:
Fix use of uninitialized scalar variable, see 3f994367a979
CID 1058763
files:
Modules/_io/iobase.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -210,8 +210,10 @@
/* 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);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list