From 39ad10b161097a70fa3f78ed543d166fbdb28feb Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 25 Oct 2010 05:45:05 +0000 Subject: [PATCH] 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/trunk@2139 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_update.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/program/src/rrd_update.c b/program/src/rrd_update.c index 563d7ac8..dbf74df6 100644 --- a/program/src/rrd_update.c +++ b/program/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)) -- 2.30.2