aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-06-02 23:27:14 +0000
committerAurelien Jacobs <aurel@gnuage.org>2008-06-02 23:27:14 +0000
commit34ae40971b3299c075878f32479c8059d7acc2bf (patch)
treec06d89b303e2528b7de40e0ccd68a5d4a7b1695c
parentfe53fa253f4a54f715249f0d88f7320ae0f65df5 (diff)
downloadffmpeg-34ae40971b3299c075878f32479c8059d7acc2bf.tar.gz
matroskadec: avoid potential mem leak
fix CID120 Originally committed as revision 13635 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/matroskadec.c1
1 files changed, 1 insertions, 0 deletions
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;