cmdutils: fix opt_values leak
authorJames Zern <jzern@google.com>
Sat, 5 Feb 2011 01:58:03 +0000 (17:58 -0800)
committerRonald S. Bultje <rsbultje@gmail.com>
Sat, 5 Feb 2011 22:18:45 +0000 (17:18 -0500)
Add free to uninit_opts and relocate opt_names to same

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
cmdutils.c
ffmpeg.c

index 58fe85c..99e4c38 100644 (file)
@@ -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)
index 371ccd2..f78e658 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -524,7 +524,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);