mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
fixed memory leak
This commit is contained in:
parent
49035ef55d
commit
73ef5e29c2
2 changed files with 7 additions and 0 deletions
|
@ -9,6 +9,12 @@ namespace i2p
|
||||||
{
|
{
|
||||||
namespace tunnel
|
namespace tunnel
|
||||||
{
|
{
|
||||||
|
TunnelEndpoint::~TunnelEndpoint ()
|
||||||
|
{
|
||||||
|
for (auto it: m_IncompleteMessages)
|
||||||
|
i2p::DeleteI2NPMessage (it.second.data);
|
||||||
|
}
|
||||||
|
|
||||||
void TunnelEndpoint::HandleDecryptedTunnelDataMsg (I2NPMessage * msg)
|
void TunnelEndpoint::HandleDecryptedTunnelDataMsg (I2NPMessage * msg)
|
||||||
{
|
{
|
||||||
m_NumReceivedBytes += TUNNEL_DATA_MSG_SIZE;
|
m_NumReceivedBytes += TUNNEL_DATA_MSG_SIZE;
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace tunnel
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TunnelEndpoint (): m_NumReceivedBytes (0) {};
|
TunnelEndpoint (): m_NumReceivedBytes (0) {};
|
||||||
|
~TunnelEndpoint ();
|
||||||
size_t GetNumReceivedBytes () const { return m_NumReceivedBytes; };
|
size_t GetNumReceivedBytes () const { return m_NumReceivedBytes; };
|
||||||
|
|
||||||
void HandleDecryptedTunnelDataMsg (I2NPMessage * msg);
|
void HandleDecryptedTunnelDataMsg (I2NPMessage * msg);
|
||||||
|
|
Loading…
Add table
Reference in a new issue