1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix memory leak on error paths in tinyexr loader

This commit is contained in:
Alistair Leslie-Hughes
2023-11-17 09:52:23 +11:00
parent ce9901ef54
commit f912a5aa56

View File

@@ -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;
}