fixed memory leak in p3GxsTunnel

This commit is contained in:
csoler 2018-02-26 23:37:19 +01:00
parent dd9f67a28b
commit aad9397ef8
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

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