changeset 9780:9f3ef4eea41a libavcodec

Fix memleak due to c->decomp_buf never being freed.
author reimar
date Sun, 31 May 2009 11:47:52 +0000
parents 4605c1f6e877
children 05b6cba2c95b
files lcldec.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lcldec.c	Sun May 31 11:42:50 2009 +0000
+++ b/lcldec.c	Sun May 31 11:47:52 2009 +0000
@@ -573,6 +573,7 @@
         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 @@
 {
     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