Commit 5f455214 authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Derk-Jan Hartman

avcodec: free p_sys->p_ff_pic in some error paths

(cherry picked from commit 8a7520b350fb4eefa1a28ed43ac9dd7aca5b16c4)
Signed-off-by: default avatarDerk-Jan Hartman <hartman@videolan.org>
parent d7aabe68
......@@ -349,6 +349,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
p_sys->p_buffer_orig = p_sys->p_buffer = malloc( p_sys->i_buffer_orig );
if( !p_sys->p_buffer_orig )
{
av_free( p_sys->p_ff_pic );
free( p_sys );
return VLC_ENOMEM;
}
......@@ -399,6 +400,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
if( ffmpeg_OpenCodec( p_dec ) < 0 )
{
msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
av_free( p_sys->p_ff_pic );
free( p_sys->p_buffer_orig );
free( p_sys );
return VLC_EGENERIC;
......
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