From fdda9b440c0a0b1a8e2b08ddf1c37e98c26e6296 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 19 Mar 2013 14:07:39 +0100 Subject: [PATCH] matroska_parse_frame: fix memleak Fixes CID991856 Signed-off-by: Michael Niedermayer --- libavformat/matroskadec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 26b218663b..115c9265eb 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2140,6 +2140,8 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska, AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, additional_size + 8); if(side_data == NULL) { + av_free_packet(pkt); + av_free(pkt); return AVERROR(ENOMEM); } AV_WB64(side_data, additional_id);