[vlc-devel] commit: avcodec: free p_sys->p_ff_pic in some error paths (Jean-Paul Saman )
git version control
git at videolan.org
Sun Jun 14 20:09:09 CEST 2009
vlc | branch: 1.0-bugfix | Jean-Paul Saman <jpsaman at videolan.org> | Wed Jun 3 23:00:36 2009 +0200| [8a7520b350fb4eefa1a28ed43ac9dd7aca5b16c4] | committer: Jean-Paul Saman
avcodec: free p_sys->p_ff_pic in some error paths
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a7520b350fb4eefa1a28ed43ac9dd7aca5b16c4
---
modules/codec/avcodec/video.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 1c2a2ef..e902843 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -331,6 +331,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;
}
@@ -381,6 +382,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;
More information about the vlc-devel
mailing list