projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88ad924
)
python plugin: Grab GIL before freeing callbacks. If their refcount reaches 0 Python...
author
Sven Trenkel
<collectd@semidefinite.de>
Mon, 15 Aug 2016 18:51:25 +0000
(18:51 +0000)
committer
Sven Trenkel
<collectd@semidefinite.de>
Mon, 15 Aug 2016 18:51:25 +0000
(18:51 +0000)
src/python.c
patch
|
blob
|
history
diff --git
a/src/python.c
b/src/python.c
index
05a44aa
..
a682f31
100644
(file)
--- a/
src/python.c
+++ b/
src/python.c
@@
-239,8
+239,10
@@
static cpy_callback_t *cpy_shutdown_callbacks;
static void cpy_destroy_user_data(void *data) {
cpy_callback_t *c = data;
free(c->name);
+ CPY_LOCK_THREADS
Py_DECREF(c->callback);
Py_XDECREF(c->data);
+ CPY_RELEASE_THREADS
free(c);
}