mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-12-20 02:28:17 +00:00
matroskadec: Free ebml binary buffer on error
Based on a Chromium patch Originally committed as revision 23169 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
465c28b6b4
commit
5549aa6d0d
@ -641,8 +641,10 @@ static int ebml_read_binary(ByteIOContext *pb, int length, EbmlBin *bin)
|
||||
|
||||
bin->size = length;
|
||||
bin->pos = url_ftell(pb);
|
||||
if (get_buffer(pb, bin->data, length) != length)
|
||||
if (get_buffer(pb, bin->data, length) != length) {
|
||||
av_freep(&bin->data);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user