Commit 09c0da0b authored by aurel's avatar aurel

matroskadec: avoid potential mem leak

fix CID120


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13635 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3352d579
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment