Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2015-06-08 22:02:30 +0300
committerJames Almer <jamrial@gmail.com>2015-06-08 22:03:31 +0300
commit34d278f9838e355b3b2c7a9c0f77d7fcaf37ce49 (patch)
tree28e66cc0af05b7d32dd028a959e0169d6f0b2874
parenta4557b7a98f78222d9616fb36cb8073cd16f11ff (diff)
mpjpegdec: fix memory leak in probe function
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavformat/mpjpegdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 8a05c9b706..7075c83886 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));
@@ -102,6 +102,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
}
}
+end:
av_free(pb);
return ret;