mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/id3v2: fix memleak with empty strings
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b83d907780
commit
cc6a59d2b9
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue