From: Arran Cudbard-Bell Date: Fri, 13 Sep 2019 20:19:22 +0000 (-0500) Subject: Ensure the thread state is the same as the one we set, after calling python land X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91a0844c0e750bfd6830daee8398fe1ff3743e46;p=thirdparty%2Ffreeradius-server.git Ensure the thread state is the same as the one we set, after calling python land --- diff --git a/src/modules/rlm_python/rlm_python.c b/src/modules/rlm_python/rlm_python.c index b2fc4ad64dc..6ff220d6617 100644 --- a/src/modules/rlm_python/rlm_python.c +++ b/src/modules/rlm_python/rlm_python.c @@ -664,7 +664,7 @@ static rlm_rcode_t do_python(rlm_python_t const *inst, rlm_python_thread_t *this PyEval_RestoreThread(this_thread->state); /* Swap in our local thread state */ rcode = do_python_single(inst, request, p_func, funcname); - PyEval_SaveThread(); + (void)fr_cond_assert(PyEval_SaveThread() == this_thread->state); return rcode; }