From: Neal Norwitz Date: Mon, 2 Jan 2006 02:46:54 +0000 (+0000) Subject: Fix ref/memory leak introduced in rev 41845. X-Git-Tag: v2.5a0~920 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50bf51a3a987121b92cb7b2e2c3097075ea6b2be;p=python Fix ref/memory leak introduced in rev 41845. --- diff --git a/Objects/typeobject.c b/Objects/typeobject.c index b403f646c4..03f1adb1d1 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; } }