Skip to content

Commit

Permalink
fix memory leak in test suite
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
  • Loading branch information
peterhillman committed Feb 4, 2020
1 parent dea0ef1 commit d4fbaad
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions OpenEXR/IlmImfTest/testMultiPartApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,21 @@ generateRandomFile (int partCount, const std::string & fn)
}
}

for (size_t i = 0 ; i < parts.size() ; ++i )
{
int partType = partTypes[i];

if (partType == 0)
{
delete (OutputPart*) parts[i];
}
else
{
delete (TiledOutputPart*) parts[i];
}

}

delete[] tiledHalfData;
delete[] tiledUintData;
delete[] tiledFloatData;
Expand Down

0 comments on commit d4fbaad

Please sign in to comment.