Merge pull request #1260 from sebras/fix-issue-1259
openjp2: Plug image leak when failing to allocate codestream index.
This commit is contained in:
commit
172c8ae5cf
|
@ -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