From 34ae40971b3299c075878f32479c8059d7acc2bf Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Mon, 2 Jun 2008 23:27:14 +0000 Subject: [PATCH] matroskadec: avoid potential mem leak fix CID120 Originally committed as revision 13635 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/matroskadec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e20332945f..e2990e45db 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2962,6 +2962,7 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size, pkt = av_mallocz(sizeof(AVPacket)); /* XXX: prevent data copy... */ if (av_new_packet(pkt, pkt_size+offset) < 0) { + av_free(pkt); res = AVERROR(ENOMEM); n = laces-1; break;