diff --git a/modules/tinyexr/image_loader_tinyexr.cpp b/modules/tinyexr/image_loader_tinyexr.cpp index f64bb14e4a8..8720ca56f6e 100644 --- a/modules/tinyexr/image_loader_tinyexr.cpp +++ b/modules/tinyexr/image_loader_tinyexr.cpp @@ -68,6 +68,7 @@ Error ImageLoaderTinyEXR::load_image(Ref p_image, Ref f, BitF if (ret != TINYEXR_SUCCESS) { if (err) { ERR_PRINT(String(err)); + FreeEXRErrorMessage(err); } return ERR_FILE_CORRUPT; } @@ -86,6 +87,7 @@ Error ImageLoaderTinyEXR::load_image(Ref p_image, Ref f, BitF if (ret != TINYEXR_SUCCESS) { if (err) { ERR_PRINT(String(err)); + FreeEXRErrorMessage(err); } return ERR_FILE_CORRUPT; }