[FFmpeg-devel] [PATCH] lavf/wtvenc: fix s[tp]_pairs memleak.

Clément Bœsch ubitux at gmail.com
Sun Nov 11 23:55:52 CET 2012


---
 libavformat/wtvenc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
index 9cc5a05..8300662 100644
--- a/libavformat/wtvenc.c
+++ b/libavformat/wtvenc.c
@@ -730,6 +730,9 @@ static int write_trailer(AVFormatContext *s)
     avio_wl32(pb, file_end_pos >> WTV_SECTOR_BITS);
 
     avio_flush(pb);
+
+    av_free(wctx->sp_pairs);
+    av_free(wctx->st_pairs);
     return 0;
 }
 
-- 
1.8.0



More information about the ffmpeg-devel mailing list