mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed memory leak in RsGenExchange::publishMsgs.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8457 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5af0716a16
commit
8cc2c921ed
@ -1820,12 +1820,9 @@ void RsGenExchange::publishMsgs()
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
RsNxsMsg* msg = new RsNxsMsg(mServType);
|
||||
RsGxsMsgItem* msgItem = mit->second;
|
||||
const uint32_t& token = mit->first;
|
||||
|
||||
msg->grpId = msgItem->meta.mGroupId;
|
||||
|
||||
uint32_t size = mSerialiser->size(msgItem);
|
||||
char* mData = new char[size];
|
||||
|
||||
@ -1841,6 +1838,9 @@ void RsGenExchange::publishMsgs()
|
||||
|
||||
if(serialOk)
|
||||
{
|
||||
RsNxsMsg* msg = new RsNxsMsg(mServType);
|
||||
msg->grpId = msgItem->meta.mGroupId;
|
||||
|
||||
msg->msg.setBinData(mData, size);
|
||||
|
||||
// now create meta
|
||||
|
Loading…
Reference in New Issue
Block a user