From: Ruben Kerkhof Date: Sat, 28 Nov 2015 19:19:26 +0000 (+0100) Subject: csv plugin: plug memory leak on error X-Git-Tag: collectd-5.6.0~559^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f006f49c993f42fc4761be8ba0cbc11408a29c17;p=collectd.git csv plugin: plug memory leak on error CID 38015 --- diff --git a/src/csv.c b/src/csv.c index 15494f45..d2d388bc 100644 --- a/src/csv.c +++ b/src/csv.c @@ -64,7 +64,10 @@ static int value_list_to_string (char *buffer, int buffer_len, && (ds->ds[i].type != DS_TYPE_GAUGE) && (ds->ds[i].type != DS_TYPE_DERIVE) && (ds->ds[i].type != DS_TYPE_ABSOLUTE)) + { + sfree (rates); return (-1); + } if (ds->ds[i].type == DS_TYPE_GAUGE) {