Commit 4ef240cf authored by Thomas Guillem's avatar Thomas Guillem

image: fix mem leak in error path

parent 055bbeb0
...@@ -135,7 +135,11 @@ static picture_t *ImageRead( image_handler_t *p_image, block_t *p_block, ...@@ -135,7 +135,11 @@ static picture_t *ImageRead( image_handler_t *p_image, block_t *p_block,
if( !p_image->p_dec ) if( !p_image->p_dec )
{ {
p_image->p_dec = CreateDecoder( p_image->p_parent, p_fmt_in ); p_image->p_dec = CreateDecoder( p_image->p_parent, p_fmt_in );
if( !p_image->p_dec ) return NULL; if( !p_image->p_dec )
{
block_Release(p_block);
return NULL;
}
} }
p_block->i_pts = p_block->i_dts = mdate(); p_block->i_pts = p_block->i_dts = mdate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment