summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-08-23 09:18:06 +0200
committerAnton Khirnov <anton@khirnov.net>2012-08-24 11:25:06 +0200
commita1bcc76e6036e78f25cbb7323c145056cfca9d93 (patch)
tree6310969d10b082739a5757355d2ab278a70ea9d5 /cmdutils.c
parentdc402854271ef3d4eaaa3c53fa85237e996a06be (diff)
downloadffmpeg-a1bcc76e6036e78f25cbb7323c145056cfca9d93.tar.gz
cmdutils: fix a memleak when specifying an option twice.
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 6576eba95c..4462858aa4 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;