[Python-checkins] r47079 - python/trunk/Objects/typeobject.c

neal.norwitz python-checkins at python.org
Fri Jun 23 05:32:45 CEST 2006


Author: neal.norwitz
Date: Fri Jun 23 05:32:44 2006
New Revision: 47079

Modified:
   python/trunk/Objects/typeobject.c
Log:
Fix refleak

Modified: python/trunk/Objects/typeobject.c
==============================================================================
--- python/trunk/Objects/typeobject.c	(original)
+++ python/trunk/Objects/typeobject.c	Fri Jun 23 05:32:44 2006
@@ -4595,8 +4595,10 @@
 	   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();
 


More information about the Python-checkins mailing list