Merge pull request #822 from Viste/memoty
Core/Misc: Fixed memory leak in trade handler
This commit is contained in:
commit
b390dd6640
1 changed files with 4 additions and 0 deletions
|
|
@ -427,6 +427,8 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
|||
trader->GetSession()->SendNotification(LANG_NOT_PARTNER_FREE_TRADE_SLOTS);
|
||||
my_trade->SetAccepted(false);
|
||||
his_trade->SetAccepted(false);
|
||||
delete my_spell;
|
||||
delete his_spell;
|
||||
return;
|
||||
}
|
||||
else if (!hisCanCompleteTrade)
|
||||
|
|
@ -437,6 +439,8 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
|||
trader->GetSession()->SendNotification(LANG_NOT_FREE_TRADE_SLOTS);
|
||||
my_trade->SetAccepted(false);
|
||||
his_trade->SetAccepted(false);
|
||||
delete my_spell;
|
||||
delete his_spell;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue