mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 14:41:50 +00:00
jpg_loader JpgLoader: Prevent memory leak
If the copied data in JpgLoader's data open is invalid, it is processed without being cleared. Therefore, data memory free is handled in the destructor.
This commit is contained in:
parent
31f45fbd5f
commit
91cf75ff04
1 changed files with 1 additions and 0 deletions
|
@ -47,6 +47,7 @@ JpgLoader::JpgLoader()
|
|||
|
||||
JpgLoader::~JpgLoader()
|
||||
{
|
||||
if (data) tjFree(data);
|
||||
tjDestroy(jpegDecompressor);
|
||||
tjFree(image);
|
||||
image = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue