mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 02:11:30 +00:00
Fixed memleak in Client::Handle_OP_MercenaryDataRequest (cppcheck)
This commit is contained in:
parent
aceaba0fb0
commit
9a47e79e8e
@ -13503,19 +13503,20 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
NPC* tar = entity_list.GetNPCByID(merchant_id);
|
||||
if(tar) {
|
||||
|
||||
if(tar) {
|
||||
int mercTypeCount = 0;
|
||||
int mercCount = 0;
|
||||
|
||||
if(DistNoRoot(*tar) > USE_NPC_RANGE2)
|
||||
return;
|
||||
|
||||
if(tar->GetClass() != MERCERNARY_MASTER) {
|
||||
return;
|
||||
}
|
||||
|
||||
MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct;
|
||||
|
||||
if(DistNoRoot(*tar) > USE_NPC_RANGE2)
|
||||
return;
|
||||
|
||||
if(tar->GetClass() != MERCERNARY_MASTER) {
|
||||
return;
|
||||
}
|
||||
|
||||
mercTypeCount = tar->GetNumMercTypes(GetClientVersion());
|
||||
mercCount = tar->GetNumMercs(GetClientVersion());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user