mirror of
https://github.com/libretro/FFmpeg.git
synced 2026-11-13 04:34:56 -10:00
cmdutils: fix a memleak when specifying an option twice.
This commit is contained in:
1 parent
dc40285427
commit
a1bcc76e60
1 file changed
+1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user