From 38a22a961cfc9a9fa0bf2f7b38c3cbc8a3a2aa30 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 18 Oct 2002 13:52:42 +0000 Subject: [PATCH] Sigh. That wasn't a memory leak, that was Guido committing before running tests. Withdraw 2.183 and its backport. --- Objects/typeobject.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 2427c4e24ab7..8a1adc914594 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -2249,11 +2249,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); -- 2.47.3