aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_process.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-02 14:56:55 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-02 14:56:55 +0100
commit26832a9237178a763d57034c9e9636da0d6d8c7b (patch)
tree8e43990c3f6cdef6389475654b695a3bb8be825c /src/libstat/stat_process.c
parentcfc1e965d51ed2fc2c6462e979094e47e47ba2f4 (diff)
downloadrspamd-26832a9237178a763d57034c9e9636da0d6d8c7b.tar.gz
rspamd-26832a9237178a763d57034c9e9636da0d6d8c7b.zip
Memory leak.
Diffstat (limited to 'src/libstat/stat_process.c')
-rw-r--r--src/libstat/stat_process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 7587baec1..7549bcce3 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -95,7 +95,8 @@ preprocess_init_stat_token (gpointer k, gpointer v, gpointer d)
t->results = g_array_sized_new (FALSE, TRUE,
sizeof (struct rspamd_token_result), cbdata->results_count);
- g_array_set_size (t->results, cbdata->results_count);
+ rspamd_mempool_add_destructor (cbdata->task->task_pool,
+ rspamd_array_free_hard, t->results);
cur = g_list_first (cbdata->classifier_runtimes);