diff --git a/contrib/spoa_server/ps_python.c b/contrib/spoa_server/ps_python.c index be6fc4b7e..3ad64a7a7 100644 --- a/contrib/spoa_server/ps_python.c +++ b/contrib/spoa_server/ps_python.c @@ -738,10 +738,14 @@ static int ps_python_exec_message(struct worker *w, void *ref, int nargs, struct } result = PyObject_Call(python_ref, empty_array, fkw); + Py_DECREF(fkw); if (result == NULL) { PyErr_Print(); return 0; } + if (result != Py_None) { + Py_DECREF(result); + } return 1; }