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:
parent
9f0c984cf5
commit
c7d303a0a8
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue