[FFmpeg-devel] [PATCH 1/2] cmdutils: fix opt_values leak
James Zern
jzern
Sat Feb 5 02:58:03 CET 2011
Add free to uninit_opts and relocate opt_names to same
---
cmdutils.c | 2 ++
ffmpeg.c | 1 -
2 files changed, 2 insertions(+), 1 deletions(-)
In addition to this it is possible that opt_names could be removed
from cmdutils.h as it's unused elsewhere.
-------------- next part --------------
diff --git a/cmdutils.c b/cmdutils.c
index 58fe85c..99e4c38 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -78,6 +78,8 @@ void uninit_opts(void)
#if CONFIG_SWSCALE
av_freep(&sws_opts);
#endif
+ av_freep(&opt_names);
+ av_freep(&opt_values);
}
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
diff --git a/ffmpeg.c b/ffmpeg.c
index 60eca1a..82af9de 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -548,7 +548,6 @@ static int ffmpeg_exit(int ret)
fclose(vstats_file);
av_free(vstats_filename);
- av_free(opt_names);
av_free(streamid_map);
av_free(input_codecs);
av_free(output_codecs);
More information about the ffmpeg-devel
mailing list