[FFmpeg-devel] [PATCH] wtvdec: fix a few memleaks as show by valgrind with the FATE test.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Jan 12 00:51:27 CET 2012


Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavformat/wtvdec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index c133d71..6c44674 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -287,6 +287,8 @@ static void wtvfile_close(AVIOContext *pb)
 {
     WtvFile *wf = pb->opaque;
     av_free(wf->sectors);
+    av_freep(&pb->opaque);
+    av_freep(&pb->buffer);
     av_free(pb);
 }
 
-- 
1.7.8.3



More information about the ffmpeg-devel mailing list