fix resource leak in opj_j2k_decode_one_tile

Fixes #597
This commit is contained in:
mayeut 2015-09-17 12:31:18 +02:00
parent 6cb56b36f6
commit a4e93c3b0a
1 changed files with 3 additions and 2 deletions

View File

@ -9733,6 +9733,7 @@ static OPJ_BOOL opj_j2k_decode_one_tile ( opj_j2k_t *p_j2k,
/* move into the codestream to the the first SOT (FIXME or not move?)*/ /* move into the codestream to the the first SOT (FIXME or not move?)*/
if (!(opj_stream_read_seek(p_stream, p_j2k->cstr_index->main_head_end + 2, p_manager) ) ) { if (!(opj_stream_read_seek(p_stream, p_j2k->cstr_index->main_head_end + 2, p_manager) ) ) {
opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n"); opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n");
opj_free(l_current_data);
return OPJ_FALSE; return OPJ_FALSE;
} }
break; break;