mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 16:05:48 -04:00
removed memory leak in handlign of old chat lobby items
This commit is contained in:
parent
b54305d508
commit
f976e1c525
1 changed files with 7 additions and 7 deletions
|
@ -1292,15 +1292,15 @@ void DistributedChatService::handleRecvLobbyInvite_Deprecated(RsChatLobbyInviteI
|
||||||
#ifdef DEBUG_CHAT_LOBBIES
|
#ifdef DEBUG_CHAT_LOBBIES
|
||||||
std::cerr << "Received deprecated invite to lobby from " << item->PeerId() << " to lobby " << std::hex << item->lobby_id << std::dec << ", named " << item->lobby_name << item->lobby_topic << std::endl;
|
std::cerr << "Received deprecated invite to lobby from " << item->PeerId() << " to lobby " << std::hex << item->lobby_id << std::dec << ", named " << item->lobby_name << item->lobby_topic << std::endl;
|
||||||
#endif
|
#endif
|
||||||
RsChatLobbyInviteItem* newItem = new RsChatLobbyInviteItem();
|
RsChatLobbyInviteItem newItem ;
|
||||||
|
|
||||||
newItem->lobby_id = item->lobby_id ;
|
newItem.lobby_id = item->lobby_id ;
|
||||||
newItem->lobby_name = item->lobby_name ;
|
newItem.lobby_name = item->lobby_name ;
|
||||||
newItem->lobby_topic = item->lobby_topic ;
|
newItem.lobby_topic = item->lobby_topic ;
|
||||||
newItem->lobby_flags = item->lobby_flags ;
|
newItem.lobby_flags = item->lobby_flags ;
|
||||||
newItem->PeerId( item->PeerId() );
|
newItem.PeerId( item->PeerId() );
|
||||||
|
|
||||||
handleRecvLobbyInvite(newItem);
|
handleRecvLobbyInvite(&newItem); // The item is not deleted inside this function.
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistributedChatService::handleRecvLobbyInvite(RsChatLobbyInviteItem *item)
|
void DistributedChatService::handleRecvLobbyInvite(RsChatLobbyInviteItem *item)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue