Commits

Kristján Valur Jónsson  committed 087ce7b

Don't DECREF the ctypes error_object without the GIL held.

  • Participants
  • Parent commits 03b3124
  • Branches 3.1

Comments (0)

Files changed (1)

File Modules/_ctypes/callproc.c

         space[0] = errno;
         errno = temp;
     }
-    Py_XDECREF(error_object);
 #ifdef WITH_THREAD
     if ((flags & FUNCFLAG_PYTHONAPI) == 0)
         Py_BLOCK_THREADS
 #endif
+    Py_XDECREF(error_object);
 #ifdef MS_WIN32
 #ifndef DONT_USE_SEH
     if (dwExceptionCode) {