From ec0f45eeb7a3199dadaf8201ae0c93e5cee21f3e Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 15 Feb 2021 08:27:19 -0500 Subject: [PATCH] plug memory leak in outbound message queue. sometimes we use rxid in our pathid so we need to clear those queues too. if we don't it'll leak from never clearing those queues. --- llarp/path/pathset.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llarp/path/pathset.cpp b/llarp/path/pathset.cpp index 6b7ab326c..8f92436e3 100644 --- a/llarp/path/pathset.cpp +++ b/llarp/path/pathset.cpp @@ -84,7 +84,10 @@ namespace llarp { if (itr->second->Expired(now)) { - router->outboundMessageHandler().QueueRemoveEmptyPath(itr->second->TXID()); + PathID_t txid = itr->second->TXID(); + router->outboundMessageHandler().QueueRemoveEmptyPath(std::move(txid)); + PathID_t rxid = itr->second->RXID(); + router->outboundMessageHandler().QueueRemoveEmptyPath(std::move(rxid)); itr = m_Paths.erase(itr); } else