diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-11 14:10:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-11 14:10:19 +0200 |
commit | cc6a59d2b9116a4084275bbb8634862ddd14ec56 (patch) | |
tree | 34538a2e1e2c83d90beb82b01eabaa106d75db85 /libavformat/id3v2.c | |
parent | b83d9077807a5cde4db5f4d726e0a02c787651cb (diff) | |
download | ffmpeg-cc6a59d2b9116a4084275bbb8634862ddd14ec56.tar.gz |
avformat/id3v2: fix memleak with empty strings
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r-- | libavformat/id3v2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 921a7c2399..9969d7a6ca 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -422,7 +422,10 @@ static void read_comment(AVFormatContext *s, AVIOContext *pb, int taglen, return; } - if (dst && dst[0]) { + if (dst && !*dst) + av_freep(&dst); + + if (dst) { key = (const char *) dst; dict_flags |= AV_DICT_DONT_STRDUP_KEY; } |