Skip to content

Commit

Permalink
Merge pull request #85002 from alesliehughes/tinyexr_mem_leak
Browse files Browse the repository at this point in the history
Fix memory leak on error paths in tinyexr loader
  • Loading branch information
akien-mga committed Dec 4, 2023
2 parents 57aea13 + f912a5a commit 2f4f87d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/tinyexr/image_loader_tinyexr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, Ref<FileAccess> f, BitF
if (ret != TINYEXR_SUCCESS) {
if (err) {
ERR_PRINT(String(err));
FreeEXRErrorMessage(err);
}
return ERR_FILE_CORRUPT;
}
Expand All @@ -86,6 +87,7 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, Ref<FileAccess> f, BitF
if (ret != TINYEXR_SUCCESS) {
if (err) {
ERR_PRINT(String(err));
FreeEXRErrorMessage(err);
}
return ERR_FILE_CORRUPT;
}
Expand Down

0 comments on commit 2f4f87d

Please sign in to comment.