[FFmpeg-cvslog] cmdutils: fix a memleak when specifying an option twice.

Anton Khirnov git at videolan.org
Fri Aug 24 14:44:32 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Aug 23 09:18:06 2012 +0200| [a1bcc76e6036e78f25cbb7323c145056cfca9d93] | committer: Anton Khirnov

cmdutils: fix a memleak when specifying an option twice.

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

 cmdutils.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/cmdutils.c b/cmdutils.c
index 6576eba..4462858 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -271,6 +271,7 @@ int parse_option(void *optctx, const char *opt, const char *arg,
     if (po->flags & OPT_STRING) {
         char *str;
         str = av_strdup(arg);
+        av_freep(dst);
         *(char **)dst = str;
     } else if (po->flags & OPT_BOOL) {
         *(int *)dst = bool_val;



More information about the ffmpeg-cvslog mailing list