From f006f49c993f42fc4761be8ba0cbc11408a29c17 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 28 Nov 2015 20:19:26 +0100 Subject: [PATCH] csv plugin: plug memory leak on error CID 38015 --- src/csv.c | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.11.0