Author: neal.norwitz
Date: Sat May 26 04:44:02 2007
New Revision: 55598

Modified:
   python/branches/p3yk/Objects/abstract.c
Log:
Fix refleak on infinite recursion

Modified: python/branches/p3yk/Objects/abstract.c
==============================================================================
--- python/branches/p3yk/Objects/abstract.c     (original)
+++ python/branches/p3yk/Objects/abstract.c     Sat May 26 04:44:02 2007
@@ -2139,8 +2139,10 @@
        if (checker != NULL) {
                PyObject *res;
                int ok = -1;
-               if (Py_EnterRecursiveCall(" in __instancecheck__"))
+               if (Py_EnterRecursiveCall(" in __instancecheck__")) {
+                       Py_DECREF(checker);
                        return ok;
+               }
                res = PyObject_CallFunctionObjArgs(checker, inst, NULL);
                Py_LeaveRecursiveCall();
                Py_DECREF(checker);
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to