Browse Source

mpjpgdec: free AVIOContext leak on early probe fail

tags/n2.7
Janne Grunau 10 years ago
parent
commit
caf7be30b1
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/mpjpegdec.c

+ 2
- 2
libavformat/mpjpegdec.c 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));
@@ -101,7 +101,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
break;
}
}
end:
av_free(pb);

return ret;


Loading…
Cancel
Save