From 0f99647a869339463d72b32371226d031c4bc26d Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 23 Jun 2017 21:58:17 +0200 Subject: [PATCH] fixed memory leak in GxsTrans --- libretroshare/src/gxstrans/p3gxstrans.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libretroshare/src/gxstrans/p3gxstrans.cc b/libretroshare/src/gxstrans/p3gxstrans.cc index 48d60a1b8..f21e94180 100644 --- a/libretroshare/src/gxstrans/p3gxstrans.cc +++ b/libretroshare/src/gxstrans/p3gxstrans.cc @@ -21,6 +21,7 @@ #include "util/stacktrace.h" #define DEBUG_GXSTRANS 1 + typedef unsigned int uint; RsGxsTrans *rsGxsTrans = NULL ; @@ -380,6 +381,9 @@ void p3GxsTrans::GxsTransIntegrityCleanupThread::run() totalMessageSizeAndCount[msg->metaData->mAuthorId].size += msg->msg.bin_len ; totalMessageSizeAndCount[msg->metaData->mAuthorId].count++; delete msg; + + if(item != NULL) + delete item ; } }