1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

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.
This commit is contained in:
Jeff Becker 2021-02-15 08:27:19 -05:00
parent 4992629f20
commit ec0f45eeb7
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -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