avformat/oggparsevorbis: fix leak of ct

Fixes CID1061058
Fixes fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-08-07 17:18:19 +02:00
parent 731f7eaaad
commit d0a882ab1d
1 changed files with 2 additions and 0 deletions

View File

@ -136,11 +136,13 @@ ff_vorbis_comment(AVFormatContext * as, AVDictionary **m, const uint8_t *buf, in
if (!pict) { if (!pict) {
av_log(as, AV_LOG_WARNING, "out-of-memory error. Skipping cover art block.\n"); av_log(as, AV_LOG_WARNING, "out-of-memory error. Skipping cover art block.\n");
av_freep(&ct);
continue; continue;
} }
if ((ret = av_base64_decode(pict, ct, vl)) > 0) if ((ret = av_base64_decode(pict, ct, vl)) > 0)
ret = ff_flac_parse_picture(as, pict, ret); ret = ff_flac_parse_picture(as, pict, ret);
av_freep(&pict); av_freep(&pict);
av_freep(&ct);
if (ret < 0) { if (ret < 0) {
av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n"); av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n");
continue; continue;