summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fxcodec/codec/fx_codec_jpx_opj.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
index 74ab5f277d..5d94d0e624 100644
--- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -769,7 +769,10 @@ bool CJPX_Decoder::Init(const unsigned char* src_data, uint32_t src_size) {
color_sycc_to_rgb(image);
}
if (image->icc_profile_buf) {
- FX_Free(image->icc_profile_buf);
+ // TODO(crbug.com/737033): Using |free| here resolves the crash described in
+ // chromium:737033, but ultimately we need to harmonize the memory
+ // allocation strategy across OpenJPEG and its PDFium callers.
+ free(image->icc_profile_buf);
image->icc_profile_buf = nullptr;
image->icc_profile_len = 0;
}