Fix contributed by Stas Shtin to stop a resource leak, see MODLANG-95

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11254 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Traun Leyden 2009-01-16 06:03:51 +00:00
parent 290daf1563
commit ef1632148d

View File

@ -198,7 +198,10 @@ static void eval_some_python(const char *funcname, char *args, switch_core_sessi
}
if (tstate) {
// thread state must be cleared explicitly or we'll get memory leaks
PyThreadState_Clear(tstate);
PyEval_ReleaseThread(tstate);
PyThreadState_Delete(tstate);
}
done: