summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-01-02 02:46:54 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-01-02 02:46:54 (GMT)
commit50bf51a3a987121b92cb7b2e2c3097075ea6b2be (patch)
tree4639b7747afcec68011473c582f7bd0c3fd3ad38
parent538561e4660eb2c15c5a2e71b7cb7e2584e09e4d (diff)
downloadcpython-50bf51a3a987121b92cb7b2e2c3097075ea6b2be.zip
cpython-50bf51a3a987121b92cb7b2e2c3097075ea6b2be.tar.gz
cpython-50bf51a3a987121b92cb7b2e2c3097075ea6b2be.tar.bz2
Fix ref/memory leak introduced in rev 41845.
-rw-r--r--Objects/typeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index b403f64..03f1adb 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1326,6 +1326,7 @@ mro_internal(PyTypeObject *type)
PyErr_Format(PyExc_TypeError,
"mro() returned a non-class ('%.500s')",
cls->ob_type->tp_name);
+ Py_DECREF(tuple);
return -1;
}
t = (PyTypeObject*)cls;
@@ -1333,6 +1334,7 @@ mro_internal(PyTypeObject *type)
PyErr_Format(PyExc_TypeError,
"mro() returned base with unsuitable layout ('%.500s')",
t->tp_name);
+ Py_DECREF(tuple);
return -1;
}
}