summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-10-18 13:51:49 (GMT)
committerGuido van Rossum <guido@python.org>2002-10-18 13:51:49 (GMT)
commit3930bc35d0aeb5a111793da634806ed6dec2161e (patch)
treec1c13c2180af24c3c5a6b2044b749b31e12956f8 /Objects/typeobject.c
parent72297bb71e3b0dd420c94fa5ed90038e445334d8 (diff)
downloadcpython-3930bc35d0aeb5a111793da634806ed6dec2161e.zip
cpython-3930bc35d0aeb5a111793da634806ed6dec2161e.tar.gz
cpython-3930bc35d0aeb5a111793da634806ed6dec2161e.tar.bz2
Sigh. That wasn't a memory leak, that was Guido committing before
running tests. Withdraw 2.183 and its backport.
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index cc60d6c..ed5b829 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);