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
1 changed files with 0 additions and 1 deletions

View File

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