changeset 32614:4558e2b7e68b

Fix memleaks on error.
author reimar
date Sun, 12 Dec 2010 10:37:15 +0000
parents e006d3eb4e60
children 1bede0ded07e
files libmpdemux/demux_gif.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_gif.c	Sun Dec 12 10:23:41 2010 +0000
+++ b/libmpdemux/demux_gif.c	Sun Dec 12 10:37:15 2010 +0000
@@ -168,6 +168,7 @@
 
   if (DGifGetLine(gif, buf, len) == GIF_ERROR) {
     PrintGifError();
+    free(buf);
     return 0; // oops
   }
 
@@ -260,6 +261,7 @@
 #endif
   if (!gif) {
     PrintGifError();
+    free(priv);
     return NULL;
   }