[FFmpeg-devel] [PATCH]lavf/segment: Fix memleak

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Aug 21 12:21:05 CEST 2015


Hi!

Attached patch fixes a memleak for me, reproducible with:
$ valgrind --leak-check=full ./ffmpeg_g -i 
fate-suite/lena.pnm -reset_timestamps 1 -f segment out%1d.avi

Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 0d66211..9345dc9 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -876,6 +876,7 @@ fail:
     av_opt_free(seg);
     av_freep(&seg->times);
     av_freep(&seg->frames);
+    av_freep(&seg->cur_entry.filename);
 
     cur = seg->segment_list_entries;
     while (cur) {


More information about the ffmpeg-devel mailing list