diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2017-02-27 22:24:23 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2017-02-28 15:00:28 +0100 |
commit | 01f15bdf8e0c9960991544d19848b81a67e3d423 (patch) | |
tree | 3170b198d1fd851b8c6019dabdbee515934e811a /type_decoder.c | |
parent | c22cbd433a6637466d5e142e900a117048024728 (diff) | |
download | libsigrokdecode-01f15bdf8e0c9960991544d19848b81a67e3d423.tar.gz libsigrokdecode-01f15bdf8e0c9960991544d19848b81a67e3d423.zip |
More refcounting fixes
PyList_SetItem steals a reference, so code calling that must either
transfer ownership or increase the refcount.
Diffstat (limited to 'type_decoder.c')
-rw-r--r-- | type_decoder.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 { |