summaryrefslogtreecommitdiff
path: root/libavutil/dict.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-01 03:56:51 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-01 03:56:51 +0100
commit086566a557eedc0cf70851b95f1cd7d691d3e41f (patch)
tree5f258c97877bb296332327cbe43953084086774c /libavutil/dict.c
parentffd02d0c197449052488b6867280dedd5425e94a (diff)
downloadffmpeg-086566a557eedc0cf70851b95f1cd7d691d3e41f.tar.gz
dict: fix memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/dict.c')
-rw-r--r--libavutil/dict.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavutil/dict.c b/libavutil/dict.c
index 23816e8f55..967c9e2fff 100644
--- a/libavutil/dict.c
+++ b/libavutil/dict.c
@@ -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