matroskadec: avoid potential mem leak
fix CID120 Originally committed as revision 13635 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
fe53fa253f
commit
34ae40971b
@ -2962,6 +2962,7 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size,
|
|||||||
pkt = av_mallocz(sizeof(AVPacket));
|
pkt = av_mallocz(sizeof(AVPacket));
|
||||||
/* XXX: prevent data copy... */
|
/* XXX: prevent data copy... */
|
||||||
if (av_new_packet(pkt, pkt_size+offset) < 0) {
|
if (av_new_packet(pkt, pkt_size+offset) < 0) {
|
||||||
|
av_free(pkt);
|
||||||
res = AVERROR(ENOMEM);
|
res = AVERROR(ENOMEM);
|
||||||
n = laces-1;
|
n = laces-1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user