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:
Robert Osfield
2011-05-06 09:20:06 +00:00
parent 67c12b14b0
commit 31aa1cdfee
3 changed files with 5 additions and 4 deletions

View File

@@ -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())