Fixed Coverity reported issues.
CID 11389: Resource leak in object (CTOR_DTOR_LEAK) Allocating memory by calling "new bsp::VBSPData". Assigning: "this->bsp_data" = "new bsp::VBSPData". The constructor allocates field "bsp_data" of "struct bsp::VBSPReader" but the destructor and whatever functions it calls do not free it.
This commit is contained in:
@@ -1055,7 +1055,7 @@ void VBSPReader::createScene()
|
||||
{
|
||||
// Get the entity
|
||||
entityText = bsp_data->getEntity(i);
|
||||
currentEntity = new VBSPEntity(entityText, bsp_data);
|
||||
currentEntity = new VBSPEntity(entityText, bsp_data.get());
|
||||
|
||||
// See if the entity is visible
|
||||
if (currentEntity->isVisible())
|
||||
|
||||
Reference in New Issue
Block a user