aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_cfg_file.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-06 13:22:50 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-06 13:22:50 +0100
commitfb999abf1898f5159982ad5d872b930225b556f7 (patch)
treec84343782135453be7452294d65c0abf9333041a /src/lua/lua_cfg_file.c
parenta612f01ccd15a4151845cc201d17d0a6323197f8 (diff)
downloadrspamd-fb999abf1898f5159982ad5d872b930225b556f7.tar.gz
rspamd-fb999abf1898f5159982ad5d872b930225b556f7.zip
Fix metrics loading.
Diffstat (limited to 'src/lua/lua_cfg_file.c')
-rw-r--r--src/lua/lua_cfg_file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lua/lua_cfg_file.c b/src/lua/lua_cfg_file.c
index 6e49d9512..563fbb77b 100644
--- a/src/lua/lua_cfg_file.c
+++ b/src/lua/lua_cfg_file.c
@@ -48,8 +48,7 @@ lua_process_metric (lua_State *L, const gchar *name, struct rspamd_config *cfg)
/* Get module opt structure */
if ((metric = g_hash_table_lookup (cfg->metrics, name)) == NULL) {
- metric = rspamd_config_new_metric (cfg, metric);
- metric->name = rspamd_mempool_strdup (cfg->cfg_pool, name);
+ metric = rspamd_config_new_metric (cfg, metric, name);
}
/* Now iterate throught module table */