[FFmpeg-cvslog] mpjpgdec: free AVIOContext leak on early probe fail

Janne Grunau git at videolan.org
Mon Jun 8 22:35:43 CEST 2015


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Mon Jun  8 13:31:04 2015 +0200| [caf7be30b11288c498fae67be4741bfbf083d977] | committer: Janne Grunau

mpjpgdec: free AVIOContext leak on early probe fail

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=caf7be30b11288c498fae67be4741bfbf083d977
---

 libavformat/mpjpegdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 354278c..72891e7 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;



More information about the ffmpeg-cvslog mailing list