summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/tinyexr/image_loader_tinyexr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/tinyexr/image_loader_tinyexr.cpp b/modules/tinyexr/image_loader_tinyexr.cpp
index f64bb14e4a..8720ca56f6 100644
--- a/modules/tinyexr/image_loader_tinyexr.cpp
+++ b/modules/tinyexr/image_loader_tinyexr.cpp
@@ -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;
}
@@ -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;
}