summaryrefslogtreecommitdiff
path: root/third_party/libopenjpeg20/0035-opj_image_data_free.patch
blob: bc674da378f2277784223255f21ab975d590eb35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/third_party/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c
index 298648a77..2374d459f 100644
--- a/third_party/libopenjpeg20/jp2.c
+++ b/third_party/libopenjpeg20/jp2.c
@@ -1116,7 +1116,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;