openjp2: Plug image leak when failing to allocate codestream index.
This fixes issue #1259.
This commit is contained in:
parent
98150d0942
commit
b028e8d1ce
|
@ -8293,6 +8293,8 @@ OPJ_BOOL opj_j2k_read_header(opj_stream_private_t *p_stream,
|
|||
|
||||
/*Allocate and initialize some elements of codestrem index*/
|
||||
if (!opj_j2k_allocate_tile_element_cstr_index(p_j2k)) {
|
||||
opj_image_destroy(*p_image);
|
||||
*p_image = NULL;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue