aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/fuzzy_check.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-12 14:34:36 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-12 14:34:36 +0000
commit8da4c8b1df36395074ca81963f4ae5cd209fd1ca (patch)
treeebac1effab2bab3e17b0e6748d9f8d3655806f00 /src/plugins/fuzzy_check.c
parentefeaa1f85446e29f703dc6fdafcaadd7f1e2ba0f (diff)
downloadrspamd-8da4c8b1df36395074ca81963f4ae5cd209fd1ca.tar.gz
rspamd-8da4c8b1df36395074ca81963f4ae5cd209fd1ca.zip
[Fix] Plug memory leak in learning fuzzy storage
MFH: true
Diffstat (limited to 'src/plugins/fuzzy_check.c')
-rw-r--r--src/plugins/fuzzy_check.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 79de7bfe9..955d6fd86 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -2359,6 +2359,7 @@ register_fuzzy_client_call (struct rspamd_task *task,
errno,
strerror (errno));
rspamd_upstream_fail (selected);
+ g_ptr_array_free (commands, TRUE);
}
else {
/* Create session for a socket */
@@ -2631,6 +2632,8 @@ fuzzy_process_handler (struct rspamd_http_connection_entry *conn_ent,
commands,
saved,
err);
+ rspamd_mempool_add_destructor (task->task_pool,
+ rspamd_ptr_array_free_hard, commands);
g_ptr_array_free (args, TRUE);
}
else {
@@ -2649,6 +2652,8 @@ fuzzy_process_handler (struct rspamd_http_connection_entry *conn_ent,
commands,
saved,
err);
+ rspamd_mempool_add_destructor (task->task_pool,
+ rspamd_ptr_array_free_hard, commands);
}
}