Code

varnish: isolate varnish v2 code
[collectd.git] / src / pyvalues.c
index 137d5eb4421f3c8ff142cb5dfec2c2204a28c8b7..78e6cf9d450413ed242fb73e6126a09f4dd86057 100644 (file)
@@ -428,8 +428,10 @@ static meta_data_t *cpy_build_meta(PyObject *meta) {
                return NULL;
        }
        s = PyList_Size(l);
-    if (s <= 0)
-        return NULL;
+       if (s <= 0) {
+               Py_XDECREF(l);
+               return NULL;
+       }
 
        m = meta_data_create();
        for (i = 0; i < s; ++i) {