[trunk] avoid memory leak in j2k_random_tile_access.c
This commit is contained in:
parent
e212154d8d
commit
ba1682c120
|
@ -271,9 +271,16 @@ int main(int argc, char **argv)
|
||||||
return EXIT_FAILURE; \
|
return EXIT_FAILURE; \
|
||||||
} \
|
} \
|
||||||
for(index = 0; index < image->numcomps; ++index) { \
|
for(index = 0; index < image->numcomps; ++index) { \
|
||||||
if( image->comps[index].data == NULL ) \
|
if( image->comps[index].data == NULL ){ \
|
||||||
|
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode tile %d\n", tile_index); \
|
||||||
|
opj_stream_destroy(l_stream); \
|
||||||
|
opj_destroy_cstr_info(&cstr_info); \
|
||||||
|
opj_destroy_codec(l_codec); \
|
||||||
|
opj_image_destroy(image); \
|
||||||
|
fclose(fsrc); \
|
||||||
return EXIT_FAILURE; \
|
return EXIT_FAILURE; \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
fprintf(stdout, "Tile %d is decoded successfully\n", tile_index);
|
fprintf(stdout, "Tile %d is decoded successfully\n", tile_index);
|
||||||
|
|
||||||
TEST_TILE(tile_ul)
|
TEST_TILE(tile_ul)
|
||||||
|
|
Loading…
Reference in New Issue