[FFmpeg-cvslog] tiff: fix memleak

Michael Niedermayer git at videolan.org
Mon Jun 3 15:00:26 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun  3 14:40:15 2013 +0200| [bbae6521136b2ce2ce5453dc2909a07941b7e18e] | committer: Michael Niedermayer

tiff: fix memleak

Fixes CID1026764
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbae6521136b2ce2ce5453dc2909a07941b7e18e
---

 libavcodec/tiff.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 9a2139f..48807fa 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -453,8 +453,10 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t *dst, int stride,
         if (!zbuf)
             return AVERROR(ENOMEM);
         if (s->fill_order) {
-            if ((ret = deinvert_buffer(s, src, size)) < 0)
+            if ((ret = deinvert_buffer(s, src, size)) < 0) {
+                av_free(zbuf);
                 return ret;
+            }
             ssrc = src = s->deinvert_buf;
         }
         ret = tiff_uncompress(zbuf, &outlen, src, size);



More information about the ffmpeg-cvslog mailing list