Commit ee0ef50e authored by Daniel Salzman's avatar Daniel Salzman

mod-stats: reduce memory allocation for disabled metrics

parent f45bedd7
......@@ -601,7 +601,7 @@ int stats_load(knotd_mod_t *mod)
*(bool *)((uint8_t *)stats + desc->conf_offset) = enabled;
int ret = knotd_mod_stats_add(mod, enabled ? desc->conf_name + 1 : NULL,
desc->count, desc->fcn);
enabled ? desc->count : 1, desc->fcn);
if (ret != KNOT_EOK) {
free(stats);
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment