From: Vsevolod Stakhov Date: Tue, 27 Mar 2018 12:24:53 +0000 (+0100) Subject: [CritFix] Plug bad memory leak in protocol reply X-Git-Tag: 1.7.3~100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7494b0f7ddbcd098da6cf02b40c1db4878cc8310;p=thirdparty%2Frspamd.git [CritFix] Plug bad memory leak in protocol reply --- diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 6662bf677b..77bbe04bfd 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -1059,6 +1059,9 @@ rspamd_protocol_write_ucl (struct rspamd_task *task, rspamd_task_set_finish_time (task); top = ucl_object_typed_new (UCL_OBJECT); + rspamd_mempool_add_destructor (task->task_pool, + (rspamd_mempool_destruct_t)ucl_object_unref, top); + if (flags & RSPAMD_PROTOCOL_METRICS) { rspamd_metric_result_ucl (task, task->result, top); }