1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 12:24:19 +00:00

cleanup queue after buffers deletion

This commit is contained in:
orignal 2020-11-28 22:25:06 -05:00
parent 242fb7db14
commit ff971563db

View File

@ -364,6 +364,7 @@ namespace client
{
for (auto& it: *m_SendQueue)
delete[] boost::asio::buffer_cast<const uint8_t *>(it);
m_SendQueue->clear ();
m_SendQueue = nullptr;
}
if (m_SessionID != 0xFFFF)
@ -415,7 +416,8 @@ namespace client
void I2CPSession::HandleI2CPMessageSentQueue (const boost::system::error_code& ecode, std::size_t bytes_transferred, SendQueue queue)
{
for (auto& it: *queue)
delete[] boost::asio::buffer_cast<const uint8_t *>(it);;
delete[] boost::asio::buffer_cast<const uint8_t *>(it);
queue->clear ();
HandleI2CPMessageSent (ecode, bytes_transferred);
}