diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-23 10:10:11 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-23 10:11:26 +0300 |
commit | 4be7fb7651418240347b78dd5874a3bb6f84d73c (patch) | |
tree | 45c5989c97b7ec4e7fe65d842154074f3058d533 /source/blender/imbuf/intern/openexr | |
parent | b6cf4f777d2c9ca0b01a746598b8cf149fe59898 (diff) |
ImBuf: Fix OpenExr leaking memory when reading file with IB_test flag
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index cd9701cf7e7..33555f0dbb5 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -2048,15 +2048,13 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem, size_t size, int flags, } } - /* file is no longer needed */ - delete membuf; - delete file; } } - if (flags & IB_alphamode_detect) ibuf->flags |= IB_alphamode_premul; } + delete file; + delete membuf; return(ibuf); } catch (const std::exception& exc) |