BUG/MINOR: contrib/spoa-server: Do not free reference to NULL

As per https://docs.python.org/3/c-api/refcounting.html, Py_DECREF
should not be called on NULL objects.

This patch must be backported as far as 2.0.
This commit is contained in:
Gilchrist Dadaglo 2020-08-24 19:21:33 +00:00 committed by Christopher Faulet
parent 9f0c984cf5
commit c7d303a0a8

View File

@ -558,7 +558,6 @@ static int ps_python_exec_message(struct worker *w, void *ref, int nargs, struct
ent = PyDict_New();
if (ent == NULL) {
Py_DECREF(kw_args);
Py_DECREF(ent);
PyErr_Print();
return 0;
}