aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2015-06-08 13:31:04 +0200
committerJanne Grunau <janne-libav@jannau.net>2015-06-08 13:55:26 +0200
commitcaf7be30b11288c498fae67be4741bfbf083d977 (patch)
treecd44e83a1d22a99b5079dd214288ffb643819eaa /libavformat
parent925b80d64029d41962e5998d7d901226c3a9baea (diff)
downloadffmpeg-caf7be30b11288c498fae67be4741bfbf083d977.tar.gz
mpjpgdec: free AVIOContext leak on early probe fail
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpjpegdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 354278c6c8..72891e7cd8 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -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;