WIP: remove memory leak about new jp2_read_marker function
This commit is contained in:
parent
45d813b62c
commit
b8214e260c
1
CHANGES
1
CHANGES
|
@ -6,6 +6,7 @@ What's New for OpenJPEG
|
|||
+ : added
|
||||
|
||||
October 20, 2011
|
||||
* [mickael] WIP: remove memory leak about new jp2_read_marker function
|
||||
* [mickael] WIP: remove previous commit about memory leak with ppm read function
|
||||
* [mickael] WIP: solve memory leak with ppm read function
|
||||
|
||||
|
|
|
@ -7716,6 +7716,7 @@ opj_bool j2k_decode_tiles ( opj_j2k_v2_t *p_j2k,
|
|||
&l_go_on,
|
||||
p_stream,
|
||||
p_manager)) {
|
||||
opj_free(l_current_data);
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -2570,11 +2570,33 @@ void jp2_destroy(opj_jp2_v2_t *jp2)
|
|||
}
|
||||
|
||||
if (jp2->color.jp2_cdef) {
|
||||
if (jp2->color.jp2_cdef->info) {
|
||||
opj_free(jp2->color.jp2_cdef->info);
|
||||
jp2->color.jp2_cdef->info = NULL;
|
||||
}
|
||||
|
||||
opj_free(jp2->color.jp2_cdef);
|
||||
jp2->color.jp2_cdef = 00;
|
||||
}
|
||||
|
||||
if (jp2->color.jp2_pclr) {
|
||||
if (jp2->color.jp2_pclr->cmap) {
|
||||
opj_free(jp2->color.jp2_pclr->cmap);
|
||||
jp2->color.jp2_pclr->cmap = NULL;
|
||||
}
|
||||
if (jp2->color.jp2_pclr->channel_sign) {
|
||||
opj_free(jp2->color.jp2_pclr->channel_sign);
|
||||
jp2->color.jp2_pclr->channel_sign = NULL;
|
||||
}
|
||||
if (jp2->color.jp2_pclr->channel_size) {
|
||||
opj_free(jp2->color.jp2_pclr->channel_size);
|
||||
jp2->color.jp2_pclr->channel_size = NULL;
|
||||
}
|
||||
if (jp2->color.jp2_pclr->entries) {
|
||||
opj_free(jp2->color.jp2_pclr->entries);
|
||||
jp2->color.jp2_pclr->entries = NULL;
|
||||
}
|
||||
|
||||
opj_free(jp2->color.jp2_pclr);
|
||||
jp2->color.jp2_pclr = 00;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue