Skip to content

Commit

Permalink
fixed memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed May 4, 2014
1 parent 4f429b3 commit 44bba19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions SSU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ namespace ssu
len = 0;
fragmentNum++;
}
DeleteI2NPMessage (msg);
}

void SSUSession::Send (uint8_t type, const uint8_t * payload, size_t len)
Expand Down
2 changes: 2 additions & 0 deletions SSUData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ namespace ssu

if (isLast)
{
if (!msg)
DeleteI2NPMessage (it->second->msg);
delete it->second;
m_IncomleteMessages.erase (it);
}
Expand Down

0 comments on commit 44bba19

Please sign in to comment.