[FFmpeg-cvslog] r19064 - trunk/libavcodec/lcldec.c

reimar subversion
Sun May 31 13:47:52 CEST 2009


Author: reimar
Date: Sun May 31 13:47:52 2009
New Revision: 19064

Log:
Fix memleak due to c->decomp_buf never being freed.

Modified:
   trunk/libavcodec/lcldec.c

Modified: trunk/libavcodec/lcldec.c
==============================================================================
--- trunk/libavcodec/lcldec.c	Sun May 31 13:42:50 2009	(r19063)
+++ trunk/libavcodec/lcldec.c	Sun May 31 13:47:52 2009	(r19064)
@@ -573,6 +573,7 @@ static av_cold int decode_init(AVCodecCo
         zret = inflateInit(&c->zstream);
         if (zret != Z_OK) {
             av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
+            av_freep(&c->decomp_buf);
             return 1;
         }
     }
@@ -590,6 +591,7 @@ static av_cold int decode_end(AVCodecCon
 {
     LclDecContext * const c = avctx->priv_data;
 
+    av_freep(&c->decomp_buf);
     if (c->pic.data[0])
         avctx->release_buffer(avctx, &c->pic);
 #if CONFIG_ZLIB_DECODER



More information about the ffmpeg-cvslog mailing list