Commit 7a06d63a authored by Hannes Domani's avatar Hannes Domani Committed by Jean-Baptiste Kempf

avcodec: fix memory leak

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent fe8d35ff
...@@ -368,6 +368,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block ) ...@@ -368,6 +368,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
p_block = vlc_av_frame_Wrap(frame); p_block = vlc_av_frame_Wrap(frame);
if (unlikely(p_block == NULL)) if (unlikely(p_block == NULL))
goto drop; goto drop;
frame = NULL;
} }
if (p_sys->b_extract) if (p_sys->b_extract)
...@@ -403,6 +404,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block ) ...@@ -403,6 +404,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
end: end:
*pp_block = NULL; *pp_block = NULL;
drop: drop:
av_frame_free(&frame);
if( p_block != NULL ) if( p_block != NULL )
block_Release(p_block); block_Release(p_block);
return NULL; return NULL;
......
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