]> sigrok.org Git - libsigrokdecode.git/commitdiff
Fix memory leak in get_current_pinvalues()
authorMarcus Comstedt <redacted>
Mon, 27 Feb 2017 21:33:17 +0000 (22:33 +0100)
committerUwe Hermann <redacted>
Tue, 28 Feb 2017 14:00:48 +0000 (15:00 +0100)
The ownership of the tuple reference is transferred to the caller, so
the refcount should not be increased.

type_decoder.c

index 7836640c45d4702765596b3f9fe88331d5248dbb..313124d47cf950822fb9e6a27216bcec05e63a3e 100644 (file)
@@ -427,8 +427,6 @@ static PyObject *get_current_pinvalues(const struct srd_decoder_inst *di)
                }
        }
 
                }
        }
 
-       Py_IncRef(py_pinvalues);
-
        return py_pinvalues;
 }
 
        return py_pinvalues;
 }