From: Tobias Oetiker Date: Mon, 25 Oct 2010 05:45:05 +0000 (+0000) Subject: follow the normal code path for exiting rrd_update if there is a problem with rrdc... X-Git-Tag: 1.4.5^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34cf8d38a738bd22d4aad42579b09d8ae970101a;p=thirdparty%2Frrdtool-1.x.git follow the normal code path for exiting rrd_update if there is a problem with rrdc, plugging a memory leak on the way -- Christian Magnusson git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4/program@2139 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_update.c b/src/rrd_update.c index 150b8d0b..f74edafb 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -429,7 +429,10 @@ int rrd_update( { /* try to connect to rrdcached */ int status = rrdc_connect(opt_daemon); - if (status != 0) return status; + if (status != 0) { + rc = status; + goto out; + } } if ((tmplt != NULL) && rrdc_is_connected(opt_daemon))