This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/python.c b/src/python.c | |
index 6be727e..ccc1c86 100644 | |
--- a/src/python.c | |
+++ b/src/python.c | |
@@ -439,7 +439,7 @@ static int cpy_write_callback(const data_set_t *ds, const value_list_t *value_li | |
v->values = list; | |
v->meta = dict; | |
ret = PyObject_CallFunctionObjArgs(c->callback, v, c->data, (void *) 0); /* New reference | |
- Py_XDECREF(v); | |
+ Py_XDECREF(&v->data); | |
if (ret == NULL) { | |
cpy_log_exception("write callback"); | |
} else { | |
@@ -465,7 +465,7 @@ static int cpy_notification_callback(const notification_t *notification, user_da | |
sstrncpy(n->message, notification->message, sizeof(n->message)); | |
n->severity = notification->severity; | |
ret = PyObject_CallFunctionObjArgs(c->callback, n, c->data, (void *) 0); /* New reference | |
- Py_XDECREF(n); | |
+ Py_XDECREF(&n->data); | |
if (ret == NULL) { | |
cpy_log_exception("notification callback"); | |
} else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment