[FFmpeg-cvslog] cmdutils: fix opt_values leak

James Zern git
Sun Feb 6 21:08:54 CET 2011


ffmpeg | branch: master | James Zern <jzern at google.com> | Fri Feb  4 17:58:03 2011 -0800| [ba3517aa6f573d280d80866e776885be7f01de77] | committer: Michael Niedermayer

cmdutils: fix opt_values leak

Add free to uninit_opts and relocate opt_names to same

Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit 3a6a9cdf5b8e4c4514e483484ef1f57b07ee16f2)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba3517aa6f573d280d80866e776885be7f01de77
---

 cmdutils.c |    2 ++
 ffmpeg.c   |    1 -
 2 files changed, 2 insertions(+), 1 deletions(-)

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 aae93f2..dfd9f9a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -534,7 +534,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-cvslog mailing list