[FFmpeg-devel] [PATCH]lavf/segment: Fix memleak
Stefano Sabatini
stefasab at gmail.com
Tue Aug 25 13:23:25 CEST 2015
On date Friday 2015-08-21 12:21:05 +0200, Carl Eugen Hoyos encoded:
> 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
> 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) {
LGTM. For the future, please send a git-format patch so that I can
apply&test&commit with no editing on my side.
--
FFmpeg = Fundamentalist and Formidable Martial Power Elected Guru
More information about the ffmpeg-devel
mailing list