From c7d303a0a8962f955e9dd271ee9775dd8eb88cfe Mon Sep 17 00:00:00 2001 From: Gilchrist Dadaglo Date: Mon, 24 Aug 2020 19:21:33 +0000 Subject: [PATCH] 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. --- contrib/spoa_server/ps_python.c | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/spoa_server/ps_python.c b/contrib/spoa_server/ps_python.c index 427ef18ee..474c75b22 100644 --- a/contrib/spoa_server/ps_python.c +++ b/contrib/spoa_server/ps_python.c @@ -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; }