matroska_parse_frame: fix memleak

Fixes CID991856
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-19 14:07:39 +01:00
parent dec9800c9d
commit fdda9b440c

View File

@ -2140,6 +2140,8 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
additional_size + 8);
if(side_data == NULL) {
av_free_packet(pkt);
av_free(pkt);
return AVERROR(ENOMEM);
}
AV_WB64(side_data, additional_id);