mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Fix potential leak in OfferLinkToPlayer
This commit is contained in:
@ -740,19 +740,18 @@ void plNetLinkingMgr::OfferLinkToPlayer( const plAgeLinkStruct * inInfo, uint32_
|
||||
// my special version - cjp
|
||||
void plNetLinkingMgr::OfferLinkToPlayer( const plAgeLinkStruct * inInfo, uint32_t playerID, plKey replyKey )
|
||||
{
|
||||
|
||||
plNetClientMgr *mgr = plNetClientMgr::GetInstance();
|
||||
plLinkToAgeMsg * linkM = new plLinkToAgeMsg(inInfo);
|
||||
linkM->AddReceiver(mgr->GetKey());
|
||||
|
||||
plKey host = mgr->GetLocalPlayerKey();
|
||||
|
||||
plNetTransport &transport = mgr->TransportMgr();
|
||||
int guestIdx = transport.FindMember(playerID);
|
||||
plNetTransportMember *guestMem = transport.GetMember(guestIdx); // -1 ?
|
||||
if(guestMem)
|
||||
if (guestMem)
|
||||
{
|
||||
plLinkToAgeMsg* linkM = new plLinkToAgeMsg(inInfo);
|
||||
linkM->AddReceiver(mgr->GetKey());
|
||||
|
||||
plKey guest = guestMem->GetAvatarKey();
|
||||
plKey host = mgr->GetLocalPlayerKey();
|
||||
plAvatarMgr::OfferLinkingBook(host, guest, linkM, replyKey);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user