Skip to content

Commit

Permalink
fix leak in InputPart constructor logic
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 8, 2020
1 parent 2cd1c58 commit 2b2fd8b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion OpenEXR/IlmImf/ImfInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,15 @@ InputFile::InputFile (InputPartData* part) :
_data (new Data (part->numThreads))
{
_data->_deleteStream=false;
multiPartInitialize (part);
try
{
multiPartInitialize (part);
}
catch(...)
{
delete _data;
throw;
}
}


Expand Down

0 comments on commit 2b2fd8b

Please sign in to comment.