summaryrefslogtreecommitdiffstats
path: root/src/health_config.c
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
commit61aedf201c2c4bf0e5aa4db32e74f4d860b88593 (patch)
treebcf4f9a0cd8bc2daf38b2ff9f29bfcc1e5ed8968 /src/health_config.c
parentNew upstream version 1.8.0+dfsg (diff)
downloadnetdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.tar.xz
netdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.zip
New upstream version 1.9.0+dfsgupstream/1.9.0+dfsg
Diffstat (limited to 'src/health_config.c')
-rw-r--r--src/health_config.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/health_config.c b/src/health_config.c
index 2ead82ef5..108eecc4a 100644
--- a/src/health_config.c
+++ b/src/health_config.c
@@ -505,11 +505,12 @@ int health_readfile(RRDHOST *host, const char *path, const char *filename) {
if(hash == hash_alarm && !strcasecmp(key, HEALTH_ALARM_KEY)) {
if (rc && (ignore_this || !rrdcalc_add_alarm_from_config(host, rc)))
- rrdcalc_free(host, rc);
+ rrdcalc_free(rc);
if(rt) {
if (ignore_this || !rrdcalctemplate_add_template_from_config(host, rt))
- rrdcalctemplate_free(host, rt);
+ rrdcalctemplate_free(rt);
+
rt = NULL;
}
@@ -532,12 +533,13 @@ int health_readfile(RRDHOST *host, const char *path, const char *filename) {
else if(hash == hash_template && !strcasecmp(key, HEALTH_TEMPLATE_KEY)) {
if(rc) {
if(ignore_this || !rrdcalc_add_alarm_from_config(host, rc))
- rrdcalc_free(host, rc);
+ rrdcalc_free(rc);
+
rc = NULL;
}
if(rt && (ignore_this || !rrdcalctemplate_add_template_from_config(host, rt)))
- rrdcalctemplate_free(host, rt);
+ rrdcalctemplate_free(rt);
rt = callocz(1, sizeof(RRDCALCTEMPLATE));
rt->name = strdupz(value);
@@ -833,10 +835,10 @@ int health_readfile(RRDHOST *host, const char *path, const char *filename) {
}
if(rc && (ignore_this || !rrdcalc_add_alarm_from_config(host, rc)))
- rrdcalc_free(host, rc);
+ rrdcalc_free(rc);
if(rt && (ignore_this || !rrdcalctemplate_add_template_from_config(host, rt)))
- rrdcalctemplate_free(host, rt);
+ rrdcalctemplate_free(rt);
fclose(fp);
return 1;