From: Christian Kröger Date: Thu, 6 Feb 2020 23:43:18 +0000 (+0100) Subject: freemem only for valid status X-Git-Tag: v1.8.0~39^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb0d4d0612840abea53f5b980b62d084f049fd9e;p=thirdparty%2Frrdtool-1.x.git freemem only for valid status --- diff --git a/bindings/python/rrdtoolmodule.c b/bindings/python/rrdtoolmodule.c index 9344c862..f0205820 100644 --- a/bindings/python/rrdtoolmodule.c +++ b/bindings/python/rrdtoolmodule.c @@ -476,10 +476,11 @@ _rrdtool_fetch(PyObject *Py_UNUSED(self), PyObject *args) for (i = 0; i < ds_cnt; i++) rrd_freemem(ds_namv[i]); + + rrd_freemem(ds_namv); + rrd_freemem(data); } - rrd_freemem(ds_namv); - rrd_freemem(data); destroy_args(&rrdtool_argv); return ret; }