summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@tsaousis.gr>2018-10-30 23:14:35 +0200
committerGitHub <noreply@github.com>2018-10-30 23:14:35 +0200
commitf739ab110b21c0d13d67569810302d36bd635746 (patch)
treed8475615ffb26553b6569f51c879e1da7f1d7948 /database
parent92327c9ec211bd1616315abcb255861b130b97ca (diff)
allow debugging memory per module (#4524)
* debug info * removed debug code
Diffstat (limited to 'database')
-rw-r--r--database/rrdhost.c2
-rw-r--r--database/rrdset.c6
-rw-r--r--database/rrdsetvar.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c
index 183aecfa1d..43aa2daa29 100644
--- a/database/rrdhost.c
+++ b/database/rrdhost.c
@@ -231,7 +231,7 @@ RRDHOST *rrdhost_create(const char *hostname,
snprintfz(filename, FILENAME_MAX, "%s/alarm-notify.sh", netdata_configured_plugins_dir);
host->health_default_exec = strdupz(config_get(CONFIG_SECTION_HEALTH, "script to execute on alarm", filename));
- host->health_default_recipient = strdup("root");
+ host->health_default_recipient = strdupz("root");
// ------------------------------------------------------------------------
diff --git a/database/rrdset.c b/database/rrdset.c
index 79ce114b48..3f5ba73b62 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -616,10 +616,10 @@ RRDSET *rrdset_create_custom(
st->rrd_memory_mode = (memory_mode == RRD_MEMORY_MODE_NONE) ? RRD_MEMORY_MODE_NONE : RRD_MEMORY_MODE_ALLOC;
}
- st->plugin_name = plugin?strdup(plugin):NULL;
- st->module_name = module?strdup(module):NULL;
+ st->plugin_name = plugin?strdupz(plugin):NULL;
+ st->module_name = module?strdupz(module):NULL;
- st->config_section = strdup(config_section);
+ st->config_section = strdupz(config_section);
st->rrdhost = host;
st->memsize = size;
st->entries = entries;
diff --git a/database/rrdsetvar.c b/database/rrdsetvar.c
index 45f661903b..1bb883f0b4 100644
--- a/database/rrdsetvar.c
+++ b/database/rrdsetvar.c
@@ -169,7 +169,7 @@ RRDSETVAR *rrdsetvar_custom_chart_variable_create(RRDSET *st, const char *name)
rs = rrdsetvar_create(st, n, RRDVAR_TYPE_CALCULATED, v, RRDVAR_OPTION_ALLOCATED|RRDVAR_OPTION_CUSTOM_CHART_VAR);
rrdset_unlock(st);
- free(n);
+ freez(n);
return rs;
}