]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix potential leak in lua send fuzzy command
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Jan 2017 16:55:57 +0000 (16:55 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Jan 2017 16:55:57 +0000 (16:55 +0000)
src/plugins/fuzzy_check.c

index 955d6fd860259f816800710d50f95300b302cb31..26ad295faf705606fee775c685127f67d9f1b4d5 100644 (file)
@@ -2874,6 +2874,8 @@ fuzzy_check_lua_process_learn (struct rspamd_task *task,
                if (commands != NULL) {
                        res = fuzzy_check_send_lua_learn (rule, task, commands,
                                        saved, err);
+                       rspamd_mempool_add_destructor (task->task_pool,
+                                       rspamd_ptr_array_free_hard, commands);
                }
 
                if (res) {