plugins: python renderer: Dereference function after calling
This commit is contained in:
parent
112a5ac74c
commit
045b9dce30
@ -44,7 +44,7 @@ int FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList
|
||||
if (PyErr_Occurred())
|
||||
PyErr_Print();
|
||||
else
|
||||
fprintf(stderr, "function not found in python module\n");
|
||||
fprintf(stderr, "Function not found in python module\n");
|
||||
|
||||
ret = -1;
|
||||
goto return_value;
|
||||
@ -56,6 +56,8 @@ int FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList
|
||||
Py_DECREF(p_return_value);
|
||||
}
|
||||
|
||||
Py_XDECREF(p_render_func);
|
||||
|
||||
return_value:
|
||||
return ret;
|
||||
}
|
||||
@ -111,6 +113,7 @@ int FUNC_DECL(EXTERNAL_LIBRARY_FINALIZE_FUNCTION)(void)
|
||||
|
||||
if (p_module)
|
||||
Py_DECREF(p_module);
|
||||
|
||||
ret = Py_FinalizeEx();
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user