From 44bba19283aa4948f33ecc52699519761a3a3606 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 4 May 2014 18:57:26 -0400 Subject: [PATCH] fixed memory leak --- SSU.cpp | 1 + SSUData.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/SSU.cpp b/SSU.cpp index 32dbf681..9711ecef 100644 --- a/SSU.cpp +++ b/SSU.cpp @@ -859,6 +859,7 @@ namespace ssu len = 0; fragmentNum++; } + DeleteI2NPMessage (msg); } void SSUSession::Send (uint8_t type, const uint8_t * payload, size_t len) diff --git a/SSUData.cpp b/SSUData.cpp index 2f3cbec2..6a7f4dc3 100644 --- a/SSUData.cpp +++ b/SSUData.cpp @@ -90,6 +90,8 @@ namespace ssu if (isLast) { + if (!msg) + DeleteI2NPMessage (it->second->msg); delete it->second; m_IncomleteMessages.erase (it); }