1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 04:45:33 +00:00

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

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;
}