Fixed memory leaks

This commit is contained in:
SChernykh
2022-06-07 19:40:13 +02:00
parent 8b681d6efb
commit 8af9e9b27d
5 changed files with 12 additions and 4 deletions
+5 -1
View File
@@ -124,6 +124,10 @@ P2PServer::~P2PServer()
delete m_block;
delete m_cache;
for (const Broadcast* data : m_broadcastQueue) {
delete data;
}
}
void P2PServer::add_cached_block(const PoolBlock& block)
@@ -785,7 +789,7 @@ void P2PServer::on_broadcast()
ON_SCOPE_LEAVE([&broadcast_queue]()
{
for (Broadcast* data : broadcast_queue) {
for (const Broadcast* data : broadcast_queue) {
delete data;
}
});