提交 34d278f9 编写于 作者: J James Almer

mpjpegdec: fix memory leak in probe function

Signed-off-by: NJames Almer <jamrial@gmail.com>
上级 a4557b7a
......@@ -88,7 +88,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
return AVERROR(ENOMEM);
if (p->buf_size < 2 || p->buf[0] != '-' || p->buf[1] != '-')
return 0;
goto end;
while (!pb->eof_reached) {
ret = get_line(pb, line, sizeof(line));
......@@ -102,6 +102,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
}
}
end:
av_free(pb);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册