python: Fix a metadata memleak and a missing include (for some versions of python)
[collectd.git] / src / pyvalues.c
index 890dc4e..60462ad 100644 (file)
@@ -473,7 +473,7 @@ static meta_data_t *cpy_build_meta(PyObject *meta) {
                if (PyErr_Occurred())
                        cpy_log_exception("building meta data");
                Py_XDECREF(value);
-               Py_DECREF(keystring);
+               Py_DECREF(key);
        }
        return m;
 }