From: Marcus Comstedt Date: Mon, 27 Feb 2017 21:33:17 +0000 (+0100) Subject: Fix memory leak in get_current_pinvalues() X-Git-Tag: libsigrokdecode-0.5.0~71 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3e18df5daa04fe3851b20909e912489bfe98e6b9;p=libsigrokdecode.git Fix memory leak in get_current_pinvalues() The ownership of the tuple reference is transferred to the caller, so the refcount should not be increased. --- diff --git a/type_decoder.c b/type_decoder.c index 7836640..313124d 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -427,8 +427,6 @@ static PyObject *get_current_pinvalues(const struct srd_decoder_inst *di) } } - Py_IncRef(py_pinvalues); - return py_pinvalues; }