mpjpegdec: fix memory leak in probe function

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2015-06-08 16:02:30 -03:00
parent a4557b7a98
commit 34d278f983
1 changed files with 2 additions and 1 deletions

View File

@ -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;