dict: fix memleak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-02-01 03:56:51 +01:00
parent ffd02d0c19
commit 086566a557
1 changed files with 1 additions and 0 deletions

View File

@ -98,6 +98,7 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags
if (!newval)
return AVERROR(ENOMEM);
av_strlcat(newval, oldval, len);
av_freep(&oldval);
av_strlcat(newval, value, len);
m->elems[m->count].value = newval;
} else