You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-06 06:27:36 +02:00
cmdutils: fix a memleak when specifying an option twice.
This commit is contained in:
@ -271,6 +271,7 @@ int parse_option(void *optctx, const char *opt, const char *arg,
|
|||||||
if (po->flags & OPT_STRING) {
|
if (po->flags & OPT_STRING) {
|
||||||
char *str;
|
char *str;
|
||||||
str = av_strdup(arg);
|
str = av_strdup(arg);
|
||||||
|
av_freep(dst);
|
||||||
*(char **)dst = str;
|
*(char **)dst = str;
|
||||||
} else if (po->flags & OPT_BOOL) {
|
} else if (po->flags & OPT_BOOL) {
|
||||||
*(int *)dst = bool_val;
|
*(int *)dst = bool_val;
|
||||||
|
Reference in New Issue
Block a user