diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-27 13:24:53 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-27 13:24:53 +0100 |
commit | 7494b0f7ddbcd098da6cf02b40c1db4878cc8310 (patch) | |
tree | 001d5be8a1a91cabc297b95c8c0180b2df188c6c /src/libserver/protocol.c | |
parent | 6283d393ff71576cd93ef04b935115cbefb0fa6e (diff) | |
download | rspamd-7494b0f7ddbcd098da6cf02b40c1db4878cc8310.tar.gz rspamd-7494b0f7ddbcd098da6cf02b40c1db4878cc8310.zip |
[CritFix] Plug bad memory leak in protocol reply
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r-- | src/libserver/protocol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 6662bf677..77bbe04bf 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); } |