mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed memory leak in RsGenExchange
This commit is contained in:
parent
0f55d73b69
commit
9a6835bf06
@ -3174,6 +3174,10 @@ void RsGenExchange::processRecvdMessages()
|
||||
for(auto& nxs_msg: msgs_to_store)
|
||||
{
|
||||
RsGxsMsgItem *item = dynamic_cast<RsGxsMsgItem*>(mSerialiser->deserialise(nxs_msg->msg.bin_data,&nxs_msg->msg.bin_len));
|
||||
|
||||
if(!item)
|
||||
continue;
|
||||
|
||||
item->meta = *nxs_msg->metaData;
|
||||
|
||||
RsGxsMsgChange* c = new RsGxsMsgChange(RsGxsNotify::TYPE_RECEIVED_NEW, item->meta.mGroupId, item->meta.mMsgId,false);
|
||||
|
@ -85,6 +85,7 @@ class RsGxsMsgChange : public RsGxsNotify
|
||||
public:
|
||||
RsGxsMsgChange(NotifyType type, const RsGxsGroupId& gid, const RsGxsMessageId& msg_id,bool metaChange)
|
||||
: RsGxsNotify(gid), mMsgId(msg_id), mNewMsgItem(nullptr),NOTIFY_TYPE(type), mMetaChange(metaChange) {}
|
||||
virtual ~RsGxsMsgChange() override { delete mNewMsgItem ; }
|
||||
|
||||
RsGxsMessageId mMsgId;
|
||||
RsGxsMsgItem *mNewMsgItem;
|
||||
|
Loading…
Reference in New Issue
Block a user