From 56ec0818c3ed195c8de2daba951ddbcb4dc7d7bc Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Mon, 11 Sep 2017 11:13:24 -0700 Subject: Use the right allocate and free functions in OpenJPEG. This patch was authored by Ke Liu of Tencent's Xuanwu Lab. BUG=762374 Change-Id: Icb3ee98fb4c399b871ccf11e9920af7caf51be11 Reviewed-on: https://pdfium-review.googlesource.com/13610 Reviewed-by: Tom Sepez Commit-Queue: Chris Palmer --- third_party/libopenjpeg20/jp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'third_party/libopenjpeg20/jp2.c') diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c index 9178f3fd63..e7e2db8bb4 100644 --- a/third_party/libopenjpeg20/jp2.c +++ b/third_party/libopenjpeg20/jp2.c @@ -1083,7 +1083,7 @@ static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image, if (!new_comps[i].data) { while (i > 0) { -- i; - opj_free(new_comps[i].data); + opj_image_data_free(new_comps[i].data); } opj_free(new_comps); opj_event_msg(p_manager, EVT_ERROR, @@ -1107,7 +1107,7 @@ static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image, /* Prevent null pointer access */ if (!src || !dst) { for (j = 0; j < nr_channels; ++j) { - opj_free(new_comps[j].data); + opj_image_data_free(new_comps[j].data); } opj_free(new_comps); new_comps = NULL; -- cgit v1.2.3