diff Objects/typeobject.c @ 25840:eea40c417205 2.2

Sigh. That wasn't a memory leak, that was Guido committing before running tests. Withdraw 2.183 and its backport.
author Guido van Rossum <guido@python.org>
date Fri, 18 Oct 2002 13:52:42 +0000
parents 8540887bcec6
children 54f32ba7047c
line wrap: on
line diff
--- a/Objects/typeobject.c	Fri Oct 18 13:42:21 2002 +0000
+++ b/Objects/typeobject.c	Fri Oct 18 13:52:42 2002 +0000
@@ -2249,11 +2249,8 @@
 	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);