mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 07:20:45 +00:00
Merge commit '1619274fb393f55a365cc10f88faa173c9a8e772'
* commit '1619274fb393f55a365cc10f88faa173c9a8e772': av_dict_set: fix potential memory leak with AV_DICT_DONT_OVERWRITE Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
375fa06125
@ -76,8 +76,11 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value,
|
||||
m = *pm = av_mallocz(sizeof(*m));
|
||||
|
||||
if (tag) {
|
||||
if (flags & AV_DICT_DONT_OVERWRITE)
|
||||
if (flags & AV_DICT_DONT_OVERWRITE) {
|
||||
if (flags & AV_DICT_DONT_STRDUP_KEY) av_free(key);
|
||||
if (flags & AV_DICT_DONT_STRDUP_VAL) av_free(value);
|
||||
return 0;
|
||||
}
|
||||
if (flags & AV_DICT_APPEND)
|
||||
oldval = tag->value;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user