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

Objects/typeobject.c

index cc60d6c6af732b5a9e9db5632bf6a971c9fd7a99..ed5b82951ae163eb000c3d2067dd7d571c701be9 100644 (file)
@@ -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);