Use opj_image_data_free() where appropriate (adapted from dab9db0723
, #1014)
This commit is contained in:
parent
5abd86b14b
commit
b73ce715d2
|
@ -180,7 +180,7 @@ void opj_copy_image_header(const opj_image_t* p_image_src,
|
||||||
for (compno = 0; compno < p_image_dest->numcomps; compno++) {
|
for (compno = 0; compno < p_image_dest->numcomps; compno++) {
|
||||||
opj_image_comp_t *image_comp = &(p_image_dest->comps[compno]);
|
opj_image_comp_t *image_comp = &(p_image_dest->comps[compno]);
|
||||||
if (image_comp->data) {
|
if (image_comp->data) {
|
||||||
opj_free(image_comp->data);
|
opj_image_data_free(image_comp->data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
opj_free(p_image_dest->comps);
|
opj_free(p_image_dest->comps);
|
||||||
|
|
|
@ -1083,7 +1083,7 @@ static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image,
|
||||||
if (!new_comps[i].data) {
|
if (!new_comps[i].data) {
|
||||||
while (i > 0) {
|
while (i > 0) {
|
||||||
-- i;
|
-- i;
|
||||||
opj_free(new_comps[i].data);
|
opj_image_data_free(new_comps[i].data);
|
||||||
}
|
}
|
||||||
opj_free(new_comps);
|
opj_free(new_comps);
|
||||||
opj_event_msg(p_manager, EVT_ERROR,
|
opj_event_msg(p_manager, EVT_ERROR,
|
||||||
|
|
Loading…
Reference in New Issue