summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_descr.py12
-rw-r--r--Misc/ACKS1
-rw-r--r--Objects/typeobject.c1
3 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index dca8ea1..ea67c4e 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1163,6 +1163,18 @@ def slots():
gc.collect()
vereq(Counted.counter, 0)
+ # Test lookup leaks [SF bug 572567]
+ import sys,gc
+ class G(object):
+ def __cmp__(self, other):
+ return 0
+ g = G()
+ orig_objects = len(gc.get_objects())
+ for i in xrange(10):
+ g==g
+ new_objects = len(gc.get_objects())
+ vereq(orig_objects, new_objects)
+
def dynamics():
if verbose: print "Testing class attribute propagation..."
class D(object):
diff --git a/Misc/ACKS b/Misc/ACKS
index fb64941..ed9b80c 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -233,6 +233,7 @@ John Interrante
Ben Jackson
Paul Jackson
David Jacobs
+Kevin Jacobs
Geert Jansen
Jack Jansen
Bill Janssen
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 47613f5..2beb3b3 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3286,6 +3286,7 @@ half_compare(PyObject *self, PyObject *other)
res = PyObject_Call(func, args, NULL);
Py_DECREF(args);
}
+ Py_DECREF(func);
if (res != Py_NotImplemented) {
if (res == NULL)
return -2;