projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hunting down pango allocation issues ... now the memory loss in rrd_graph seems to...
[rrdtool.git]
/
src
/
rrd_flushcached.c
diff --git
a/src/rrd_flushcached.c
b/src/rrd_flushcached.c
index
f7a715e
..
93b0fb5
100644
(file)
--- a/
src/rrd_flushcached.c
+++ b/
src/rrd_flushcached.c
@@
-74,8
+74,7
@@
int rrd_flushcached (int argc, char **argv)
/* try to connect to rrdcached */
status = rrdc_connect(opt_daemon);
/* try to connect to rrdcached */
status = rrdc_connect(opt_daemon);
- if (opt_daemon) free(opt_daemon);
- if (status != 0) return status;
+ if (status != 0) goto out;
if (! rrdc_is_connected(opt_daemon))
{
if (! rrdc_is_connected(opt_daemon))
{
@@
-83,7
+82,8
@@
int rrd_flushcached (int argc, char **argv)
"option to set an address on the command line or set the "
"\"%s\" environment variable.",
ENV_RRDCACHED_ADDRESS);
"option to set an address on the command line or set the "
"\"%s\" environment variable.",
ENV_RRDCACHED_ADDRESS);
- return (-1);
+ status = -1;
+ goto out;
}
status = 0;
}
status = 0;
@@
-107,7
+107,10
@@
int rrd_flushcached (int argc, char **argv)
}
}
}
}
- return ((status == 0) ? 0 : -1);
+out:
+ if (opt_daemon) free(opt_daemon);
+
+ return status;
} /* int rrd_flush */
/*
} /* int rrd_flush */
/*