diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-05-31 11:47:52 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-05-31 11:47:52 +0000 |
commit | bbf306742cd289929a423d5de847e6053aeaefa2 (patch) | |
tree | 938194d5fc1f18d375056ff0fa89c548b345a70f /libavcodec/lcldec.c | |
parent | 908425c758569577f4ba4b6e2772308112ad1385 (diff) | |
download | ffmpeg-bbf306742cd289929a423d5de847e6053aeaefa2.tar.gz |
Fix memleak due to c->decomp_buf never being freed.
Originally committed as revision 19064 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r-- | libavcodec/lcldec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index 0d56303298..53637f2507 100644 --- a/libavcodec/lcldec.c +++ b/libavcodec/lcldec.c @@ -573,6 +573,7 @@ static av_cold int decode_init(AVCodecContext *avctx) 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(AVCodecContext *avctx) { 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 |