From ed512a4d0969a93402e3d4245540dff24b0dce4c Mon Sep 17 00:00:00 2001 From: Kristjan Valur Jonsson Date: Fri, 21 Dec 2012 10:32:57 +0000 Subject: ctypes: DECREF error_object _after_ re-acquiring GIL --- Modules/_ctypes/callproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index ef3e974..23825a7 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -844,11 +844,11 @@ static int _call_function_pointer(int flags, 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) { -- cgit v0.12