mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-26 07:17:16 +00:00
Fixed memleak in Client::Handle_OP_MercenaryDataRequest (cppcheck)
This commit is contained in:
@@ -13503,12 +13503,11 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NPC* tar = entity_list.GetNPCByID(merchant_id);
|
NPC* tar = entity_list.GetNPCByID(merchant_id);
|
||||||
|
|
||||||
if(tar) {
|
if(tar) {
|
||||||
int mercTypeCount = 0;
|
int mercTypeCount = 0;
|
||||||
int mercCount = 0;
|
int mercCount = 0;
|
||||||
|
|
||||||
MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct;
|
|
||||||
|
|
||||||
if(DistNoRoot(*tar) > USE_NPC_RANGE2)
|
if(DistNoRoot(*tar) > USE_NPC_RANGE2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -13516,6 +13515,8 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct;
|
||||||
|
|
||||||
mercTypeCount = tar->GetNumMercTypes(GetClientVersion());
|
mercTypeCount = tar->GetNumMercTypes(GetClientVersion());
|
||||||
mercCount = tar->GetNumMercs(GetClientVersion());
|
mercCount = tar->GetNumMercs(GetClientVersion());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user