From 51e1cc16d3e89a785f3231065c4eb898a0401a93 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Sun, 22 Jun 2008 15:46:36 +0000 Subject: [PATCH] matroskadec: fix a memory leak Originally committed as revision 13890 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/matroskadec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 69208a8..e01af26 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2887,6 +2887,9 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size, memcpy (pkt->data, matroska->tracks[track]->encoding_settings, offset); memcpy (pkt->data+offset, pkt_data, pkt_size); + if (pkt_data != data) + av_free(pkt_data); + if (n == 0) pkt->flags = is_keyframe; pkt->stream_index = stream_index; -- 2.7.4