matroskadec: fix memleak of pkt_data

Fixes: CID1026767
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-06-03 16:07:06 +02:00
parent 0722b4d08c
commit 2fe4b6210c
1 changed files with 2 additions and 1 deletions

View File

@ -2264,7 +2264,8 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
/* XXX: prevent data copy... */
if (av_new_packet(pkt, pkt_size + offset) < 0) {
av_free(pkt);
return AVERROR(ENOMEM);
res = AVERROR(ENOMEM);
goto fail;
}
if (st->codec->codec_id == AV_CODEC_ID_PRORES) {