summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-06-23 03:32:44 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-06-23 03:32:44 (GMT)
commitb114984225c0371a21ce44e037abb452e36e2a6d (patch)
tree036faba9c2d58103bd86d7d1ac085f73e5170f42 /Objects
parentff355f1adaa423c143c169221bd4a80775adf8bb (diff)
downloadcpython-b114984225c0371a21ce44e037abb452e36e2a6d.zip
cpython-b114984225c0371a21ce44e037abb452e36e2a6d.tar.gz
cpython-b114984225c0371a21ce44e037abb452e36e2a6d.tar.bz2
Fix refleak
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 760ef95..2046972 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4595,8 +4595,10 @@ slot_tp_call(PyObject *self, PyObject *args, PyObject *kwds)
the object returned for __call__ has __call__ itself defined
upon it. This can be an infinite recursion if you set
__call__ in a class to an instance of it. */
- if (Py_EnterRecursiveCall(" in __call__"))
+ if (Py_EnterRecursiveCall(" in __call__")) {
+ Py_DECREF(meth);
return NULL;
+ }
res = PyObject_Call(meth, args, kwds);
Py_LeaveRecursiveCall();