[Freeswitch-svn] [commit] r11254 - freeswitch/trunk/src/mod/languages/mod_python
FreeSWITCH SVN
greenlizard at freeswitch.org
Thu Jan 15 22:03:51 PST 2009
Author: greenlizard
Date: Fri Jan 16 00:03:51 2009
New Revision: 11254
Log:
Fix contributed by Stas Shtin to stop a resource leak, see MODLANG-95
Modified:
freeswitch/trunk/src/mod/languages/mod_python/mod_python.c
Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/mod_python.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python.c Fri Jan 16 00:03:51 2009
@@ -198,7 +198,10 @@
}
if (tstate) {
+ // thread state must be cleared explicitly or we'll get memory leaks
+ PyThreadState_Clear(tstate);
PyEval_ReleaseThread(tstate);
+ PyThreadState_Delete(tstate);
}
done:
More information about the Freeswitch-svn
mailing list