From f4b1a7d87cd59ab316b54f529ff03ac1dee4df77 Mon Sep 17 00:00:00 2001 From: "elias.bachaalany" Date: Thu, 6 May 2010 07:51:36 +0000 Subject: [PATCH] handle_python_error() was leaking an object --- python.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python.cpp b/python.cpp index 97f72db..d37fda0 100644 --- a/python.cpp +++ b/python.cpp @@ -169,6 +169,7 @@ static void handle_python_error(char *errbuf, size_t errbufsize) Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); + Py_DECREF(result); } else PyErr_Print(); @@ -369,7 +370,7 @@ bool idaapi IDAPython_Menu_Callback(void *ud) static bool parse_py_modname( const char *full_name, char *modname, - char *attrname, + char *attrname, size_t sz, const char *defmod = "idaapi") { @@ -805,7 +806,7 @@ static void install_python_menus() menu_installed = true; } -enum script_run_when +enum script_run_when { run_on_db_open = 0, // run script after opening database (default) run_on_ui_ready = 1, // run script when UI is ready