]> granicus.if.org Git - python/commitdiff
Fix ref/memory leak introduced in rev 41845.
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 2 Jan 2006 02:46:54 +0000 (02:46 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 2 Jan 2006 02:46:54 +0000 (02:46 +0000)
Objects/typeobject.c

index b403f646c434946e93c71bf840e68febc670bdcd..03f1adb1d17345c669c677e7de88fd05616f5ff5 100644 (file)
@@ -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;
                        }
                }