demux_gif: Fix memleaks on error

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32701 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-12-12 10:37:15 +00:00 committed by Uoti Urpala
parent 8a0f074043
commit 7ed3291a4f
1 changed files with 2 additions and 0 deletions

View File

@ -167,6 +167,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
if (DGifGetLine(gif, buf, len) == GIF_ERROR) {
PrintGifError();
free(buf);
return 0; // oops
}
@ -259,6 +260,7 @@ static demuxer_t* demux_open_gif(demuxer_t* demuxer)
#endif
if (!gif) {
PrintGifError();
free(priv);
return NULL;
}