Commit 5f138598 authored by Jun Zhao's avatar Jun Zhao

lavf/4xm: fix memory leak in error handing path

need to free the header in error path.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent 85e338ab
......@@ -241,7 +241,8 @@ static int fourxm_read_header(AVFormatContext *s)
size = AV_RL32(&header[i + 4]);
if (size > header_size - i - 8 && (fourcc_tag == vtrk_TAG || fourcc_tag == strk_TAG)) {
av_log(s, AV_LOG_ERROR, "chunk larger than array %d>%d\n", size, header_size - i - 8);
return AVERROR_INVALIDDATA;
ret = AVERROR_INVALIDDATA;
goto fail;
}
if (fourcc_tag == std__TAG) {
......
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