diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2011-01-27 22:13:08 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2011-01-27 22:16:06 +0100 |
commit | 4fa17efc0be6542055476bd7764fc04391bc652d (patch) | |
tree | 6bec1bda23f5b65b05b40f2e101fa67c963f1ac9 | |
parent | 6b08da24ec79989565e5417cf111a243073cd2fd (diff) | |
download | libsigrokdecode-4fa17efc0be6542055476bd7764fc04391bc652d.tar.gz libsigrokdecode-4fa17efc0be6542055476bd7764fc04391bc652d.zip |
Bugfix: Add missing Py_INCREF()s.
This should fix an error/segfault when running a decoder on bigger
datasets.
-rw-r--r-- | decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -259,9 +259,9 @@ int sigrokdecode_run_decoder(struct sigrokdecode_decoder *dec, /* TODO: Error handling. */ py_mod = dec->py_mod; + Py_INCREF(py_mod); py_func = dec->py_func; - - /* TODO: Really run Py_DECREF on py_mod/py_func? */ + Py_INCREF(py_func); /* Create a Python tuple of size 1. */ if (!(py_args = PyTuple_New(1))) { /* NEWREF */ |