mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed memory leak in p3GxsTunnel
This commit is contained in:
parent
dd9f67a28b
commit
aad9397ef8
@ -143,7 +143,10 @@ void p3GxsTunnelService::flush()
|
||||
|
||||
for(std::list<RsGxsTunnelDHPublicKeyItem*>::iterator it=pendingDHItems.begin();it!=pendingDHItems.end();)
|
||||
if(locked_sendClearTunnelData(*it) )
|
||||
{
|
||||
delete *it ;
|
||||
it = pendingDHItems.erase(it) ;
|
||||
}
|
||||
else
|
||||
++it ;
|
||||
}
|
||||
@ -155,7 +158,10 @@ void p3GxsTunnelService::flush()
|
||||
|
||||
for(std::list<RsGxsTunnelItem*>::iterator it=pendingGxsTunnelItems.begin();it!=pendingGxsTunnelItems.end();)
|
||||
if(locked_sendEncryptedTunnelData(*it) )
|
||||
{
|
||||
delete *it ;
|
||||
it = pendingGxsTunnelItems.erase(it) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
++it ;
|
||||
@ -744,6 +750,8 @@ void p3GxsTunnelService::receiveTurtleData(RsTurtleGenericTunnelItem *gitem,cons
|
||||
}
|
||||
else
|
||||
std::cerr << "(EE) Deserialiased item has unexpected type." << std::endl;
|
||||
|
||||
delete citem ;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user