X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpyvalues.c;h=78e6cf9d450413ed242fb73e6126a09f4dd86057;hb=082c59b439105cc5c0b787346ac2bdb9ca10e5a6;hp=137d5eb4421f3c8ff142cb5dfec2c2204a28c8b7;hpb=f0cb93348f16ee9bb3138d1ef977ebc796123c9d;p=collectd.git diff --git a/src/pyvalues.c b/src/pyvalues.c index 137d5eb4..78e6cf9d 100644 --- a/src/pyvalues.c +++ b/src/pyvalues.c @@ -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) {