projects
/
libsigrokdecode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b08da2
)
Bugfix: Add missing Py_INCREF()s.
author
Uwe Hermann
<uwe@hermann-uwe.de>
Thu, 27 Jan 2011 21:13:08 +0000
(22:13 +0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Thu, 27 Jan 2011 21:16:06 +0000
(22:16 +0100)
This should fix an error/segfault when running a decoder on bigger
datasets.
decode.c
patch
|
blob
|
history
diff --git
a/decode.c
b/decode.c
index db29494523eb867af0d6334376ab94862f67841a..5289470670a227606666bdf0a7353769fd4bdab5 100644
(file)
--- a/
decode.c
+++ b/
decode.c
@@
-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 */