From cc25a887c5467be5c7b004665047a32d36c9cf42 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Sun, 7 May 2017 11:29:08 +0800 Subject: [PATCH] avformat/matroskadec: fix resource leak Fixes Coverity CID: 1405453 Reviewed-by: wm4 Reviewed-by: Hendrik Leppkes Signed-off-by: Steven Liu --- libavformat/matroskadec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 9e2c9bd2e2..94a56ebfa7 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3893,6 +3893,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s, int64_t init_range) "%" PRId64, s->streams[0]->index_entries[i].timestamp); if (ret <= 0 || (ret == 20 && i == s->streams[0]->nb_index_entries - 1)) { av_log(s, AV_LOG_ERROR, "timestamp too long.\n"); + av_free(buf); return AVERROR_INVALIDDATA; } end += ret;