Guest User

Untitled

a guest
May 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. diff --git a/src/python.c b/src/python.c
  2. index 6be727e..ccc1c86 100644
  3. --- a/src/python.c
  4. +++ b/src/python.c
  5. @@ -439,7 +439,7 @@ static int cpy_write_callback(const data_set_t *ds, const value_list_t *value_li
  6. v->values = list;
  7. v->meta = dict;
  8. ret = PyObject_CallFunctionObjArgs(c->callback, v, c->data, (void *) 0); /* New reference
  9. - Py_XDECREF(v);
  10. + Py_XDECREF(&v->data);
  11. if (ret == NULL) {
  12. cpy_log_exception("write callback");
  13. } else {
  14. @@ -465,7 +465,7 @@ static int cpy_notification_callback(const notification_t *notification, user_da
  15. sstrncpy(n->message, notification->message, sizeof(n->message));
  16. n->severity = notification->severity;
  17. ret = PyObject_CallFunctionObjArgs(c->callback, n, c->data, (void *) 0); /* New reference
  18. - Py_XDECREF(n);
  19. + Py_XDECREF(&n->data);
  20. if (ret == NULL) {
  21. cpy_log_exception("notification callback");
  22. } else {
Add Comment
Please, Sign In to add comment