mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
Core/Misc: Fixed memory leak in trade handler
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user