From 01f15bdf8e0c9960991544d19848b81a67e3d423 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Mon, 27 Feb 2017 22:24:23 +0100 Subject: More refcounting fixes PyList_SetItem steals a reference, so code calling that must either transfer ownership or increase the refcount. --- type_decoder.c | 1 + 1 file changed, 1 insertion(+) (limited to 'type_decoder.c') diff --git a/type_decoder.c b/type_decoder.c index 9481bdb..7836640 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -542,6 +542,7 @@ static int set_new_condition_list(PyObject *self, PyObject *args) return 9999; /* The PD invoked self.wait({}). */ /* Make a list and put the dict in there for convenience. */ py_conditionlist = PyList_New(1); + Py_IncRef(py_conds); PyList_SetItem(py_conditionlist, 0, py_conds); num_conditions = 1; } else { -- cgit v1.2.3-70-g09d2