Commit caf7be30 authored by Janne Grunau's avatar Janne Grunau

mpjpgdec: free AVIOContext leak on early probe fail

parent 925b80d6
...@@ -88,7 +88,7 @@ static int mpjpeg_read_probe(AVProbeData *p) ...@@ -88,7 +88,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
if (p->buf_size < 2 || p->buf[0] != '-' || p->buf[1] != '-') if (p->buf_size < 2 || p->buf[0] != '-' || p->buf[1] != '-')
return 0; goto end;
while (!pb->eof_reached) { while (!pb->eof_reached) {
ret = get_line(pb, line, sizeof(line)); ret = get_line(pb, line, sizeof(line));
...@@ -101,7 +101,7 @@ static int mpjpeg_read_probe(AVProbeData *p) ...@@ -101,7 +101,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
break; break;
} }
} }
end:
av_free(pb); av_free(pb);
return ret; return ret;
......
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