From: Vsevolod Stakhov Date: Sun, 20 Mar 2022 12:45:59 +0000 (+0000) Subject: [Fix] Plug memory leak by using mempool for a copied address X-Git-Tag: 3.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a7a082211a952f8ce170d177db848881d994d99;p=thirdparty%2Frspamd.git [Fix] Plug memory leak by using mempool for a copied address --- diff --git a/src/libmime/received.cxx b/src/libmime/received.cxx index 0886d6e37a..82ec2dac03 100644 --- a/src/libmime/received.cxx +++ b/src/libmime/received.cxx @@ -737,7 +737,8 @@ received_maybe_fix_task(struct rspamd_task *task) -> bool if (mta_name) { trecv.by_hostname.assign_copy(std::string_view(mta_name)); } - trecv.addr = rspamd_inet_address_copy(task->from_addr, NULL); + trecv.addr = rspamd_inet_address_copy(task->from_addr, + task->task_pool); if (task->hostname) { trecv.real_hostname.assign_copy(std::string_view(task->hostname));