X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_prometheus.c;h=61c43fed7ae921265e049c663804a92e0273a060;hb=446138394bb95c49d0e05ea440fbf63aefe84bab;hp=6dee98abc4ec2b994f522a07add1faf25793be1b;hpb=b9f877bc827ea4c0097682fc87cc5bcfd0000807;p=collectd.git diff --git a/src/write_prometheus.c b/src/write_prometheus.c index 6dee98ab..61c43fed 100644 --- a/src/write_prometheus.c +++ b/src/write_prometheus.c @@ -694,8 +694,10 @@ metric_family_get(data_set_t const *ds, value_list_t const *vl, size_t ds_index, return fam; } - if (!allocate) + if (!allocate) { + sfree(name); return NULL; + } fam = metric_family_create(name, ds, vl, ds_index); if (fam == NULL) {