diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-11-26 22:16:13 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-04 15:46:46 +0100 |
commit | 9de6688cc4216381e155a5b3f7d88c26806db93d (patch) | |
tree | 39a1501cd38c6000f583eb5d70d589bd4b36e411 /libavcodec/mjpegdec.c | |
parent | f3e645a7967d64df8a19c4e0eea93f17937913fb (diff) |
avcodec/mxpegdec: Fix memleaks upon init failure
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 6cf8014490..c2d946752e 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2815,6 +2815,8 @@ the_end_no_picture: return buf_ptr - buf; } +/* mxpeg may call the following function (with a blank MJpegDecodeContext) + * even without having called ff_mjpeg_decode_init(). */ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx) { MJpegDecodeContext *s = avctx->priv_data; |