From: Guido van Rossum Date: Fri, 18 Oct 2002 13:51:49 +0000 (+0000) Subject: Sigh. That wasn't a memory leak, that was Guido committing before X-Git-Tag: v2.3c1~3735 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3930bc35d0aeb5a111793da634806ed6dec2161e;p=python Sigh. That wasn't a memory leak, that was Guido committing before running tests. Withdraw 2.183 and its backport. --- diff --git a/Objects/typeobject.c b/Objects/typeobject.c index cc60d6c6af..ed5b82951a 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -2468,11 +2468,8 @@ add_subclass(PyTypeObject *base, PyTypeObject *type) while (--i >= 0) { ref = PyList_GET_ITEM(list, i); assert(PyWeakref_CheckRef(ref)); - if (PyWeakref_GET_OBJECT(ref) == Py_None) { - i = PyList_SetItem(list, i, new); - Py_DECREF(new); - return i; - } + if (PyWeakref_GET_OBJECT(ref) == Py_None) + return PyList_SetItem(list, i, new); } i = PyList_Append(list, new); Py_DECREF(new);