X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpython.c;h=95240afb6a951d3994e97e4009e8724efc5aa801;hb=58a503a9659c95813d0eb09382e3478b242f2de8;hp=10ac8f0d149f815fa9d00e54bdda3e0123246029;hpb=96e0f2341bace029acefe0a88bab96ae326c0ff5;p=collectd.git diff --git a/src/python.c b/src/python.c index 10ac8f0d..95240afb 100644 --- a/src/python.c +++ b/src/python.c @@ -289,7 +289,7 @@ void cpy_log_exception(const char *context) { Py_XDECREF(traceback); return; } - list = PyObject_CallFunction(cpy_format_exception, "NNN", type, value, traceback); /* New reference. */ + list = PyObject_CallFunction(cpy_format_exception, "NNN", type, value, traceback); /* New reference. Steals references from "type", "value" and "traceback". */ if (list) l = PyObject_Length(list); for (i = 0; i < l; ++i) { @@ -309,9 +309,6 @@ void cpy_log_exception(const char *context) { } Py_XDECREF(list); PyErr_Clear(); - Py_DECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); } static int cpy_read_callback(user_data_t *data) {