]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_python: fix memory leak (MODLANG-136)
authorMichael Jerris <mike@jerris.com>
Wed, 11 Nov 2009 17:12:36 +0000 (17:12 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 11 Nov 2009 17:12:36 +0000 (17:12 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15432 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_python/mod_python.c

index 554ca70477c9f5718c64fdfb7cd1f65dc0d223fd..ab3eed08a788c238447bcde91905c8f5f201345d 100644 (file)
@@ -187,6 +187,7 @@ static void eval_some_python(const char *funcname, char *args, switch_core_sessi
        // invoke the handler 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call python script \n");
        result = PyEval_CallObjectWithKeywords(function, arg, (PyObject *) NULL);
+       Py_DECREF(function);
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Finished calling python script \n");
        
        // check the result and print out any errors