diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index 49fa13cb6..4b2161985 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -4179,6 +4179,7 @@ void RsGxsNetService::handleRecvSyncMessage(RsNxsSyncMsgReqItem *item,bool item_ delete *it ; itemL.clear() ; + delete mItem ; break ; } } diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc index d4b5fe332..d700f6a42 100644 --- a/libretroshare/src/rsserver/p3peers.cc +++ b/libretroshare/src/rsserver/p3peers.cc @@ -1073,6 +1073,8 @@ std::string p3Peers::getPGPKey(const RsPgpId& pgp_id,bool include_signatures) RsCertificate cert( Detail,mem_block,mem_block_size ) ; + delete[] mem_block ; + return cert.armouredPGPKey() ; } @@ -1125,6 +1127,8 @@ std::string p3Peers::GetRetroshareInvite(const RsPeerId& ssl_id,bool include_sig RsCertificate cert( Detail,mem_block,mem_block_size ) ; + delete[] mem_block ; + return cert.toStdString() ; }