mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed memory leak in DistributedChatService::invitePeerToLobby when lobby not found.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8452 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e8b5ab9fae
commit
c187c03758
@ -1168,8 +1168,6 @@ void DistributedChatService::invitePeerToLobby(const ChatLobbyId& lobby_id, cons
|
||||
std::cerr << "Sending invitation to peer " << peer_id << " to lobby "<< std::hex << lobby_id << std::dec << std::endl;
|
||||
#endif
|
||||
|
||||
RsChatLobbyInviteItem *item = new RsChatLobbyInviteItem ;
|
||||
|
||||
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
std::map<ChatLobbyId,ChatLobbyEntry>::iterator it = _chat_lobbys.find(lobby_id) ;
|
||||
@ -1181,6 +1179,9 @@ void DistributedChatService::invitePeerToLobby(const ChatLobbyId& lobby_id, cons
|
||||
#endif
|
||||
return ;
|
||||
}
|
||||
|
||||
RsChatLobbyInviteItem *item = new RsChatLobbyInviteItem ;
|
||||
|
||||
item->lobby_id = lobby_id ;
|
||||
item->lobby_name = it->second.lobby_name ;
|
||||
item->lobby_topic = it->second.lobby_topic ;
|
||||
|
Loading…
Reference in New Issue
Block a user