Commit cc6a59d2 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/id3v2: fix memleak with empty strings

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b83d9077
...@@ -422,7 +422,10 @@ static void read_comment(AVFormatContext *s, AVIOContext *pb, int taglen, ...@@ -422,7 +422,10 @@ static void read_comment(AVFormatContext *s, AVIOContext *pb, int taglen,
return; return;
} }
if (dst && dst[0]) { if (dst && !*dst)
av_freep(&dst);
if (dst) {
key = (const char *) dst; key = (const char *) dst;
dict_flags |= AV_DICT_DONT_STRDUP_KEY; dict_flags |= AV_DICT_DONT_STRDUP_KEY;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment