summaryrefslogtreecommitdiffstats
path: root/src/settings.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-02-03 22:32:58 +0400
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-02-03 22:32:58 +0400
commitf494f6aaa13ef94c6cd3795232d6ab3444ca79a5 (patch)
treef8d243ad8e68ecee6c8a74a5f09726b4df483a40 /src/settings.c
parente21f9c9561d7346959a8f794cee000b924d06dd7 (diff)
downloadrspamd-f494f6aaa13ef94c6cd3795232d6ab3444ca79a5.tar.gz
rspamd-f494f6aaa13ef94c6cd3795232d6ab3444ca79a5.zip
Fix critical memory leak in settings code.
Format HTTP date correctly. Fix map watch timeout.
Diffstat (limited to 'src/settings.c')
-rw-r--r--src/settings.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/settings.c b/src/settings.c
index d7e96222a..7f92e112d 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -73,6 +73,10 @@ settings_free (gpointer data)
if (s->blacklist) {
g_hash_table_destroy (s->blacklist);
}
+ if (s->metric_actions) {
+ g_hash_table_destroy (s->metric_actions);
+ }
+
g_slice_free1 (sizeof (struct rspamd_settings), s);
}
@@ -285,6 +289,7 @@ json_fin_cb (memory_pool_t * pool, struct map_cb_data *data)
if (cur_act != NULL) {
g_hash_table_insert (cur_settings->metric_actions,
g_strdup (json_object_iter_key (json_it)), cur_act);
+ cur_act = NULL;
}
}
json_it = json_object_iter_next (cur_nm, json_it);