[FFmpeg-cvslog] dict: fix memleak
Michael Niedermayer
git at videolan.org
Fri Feb 1 04:01:59 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Feb 1 03:56:51 2013 +0100| [086566a557eedc0cf70851b95f1cd7d691d3e41f] | committer: Michael Niedermayer
dict: fix memleak
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=086566a557eedc0cf70851b95f1cd7d691d3e41f
---
libavutil/dict.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavutil/dict.c b/libavutil/dict.c
index 23816e8..967c9e2 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
More information about the ffmpeg-cvslog
mailing list