]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Sigh. That wasn't a memory leak, that was Guido committing before
authorGuido van Rossum <guido@python.org>
Fri, 18 Oct 2002 13:52:42 +0000 (13:52 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 18 Oct 2002 13:52:42 +0000 (13:52 +0000)
running tests.  Withdraw 2.183 and its backport.

Objects/typeobject.c

index 2427c4e24ab7861e22cc9d345cb7db59a1842b74..8a1adc914594d5345d4567d12c15f8fdfc67d5d8 100644 (file)
@@ -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);