Core/Misc: Fixed memory leak in trade handler

This commit is contained in:
Shauren
2018-03-31 23:35:00 +03:00
committed by Viste
parent d7e4799728
commit 77abc1df0e

View File

@@ -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;
}