[FFmpeg-devel] [PATCH 21/30] avcodec/mobiclip: Fix memleak upon init failure
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Tue Sep 15 10:39:51 EEST 2020
If an error happens during init after an allocation has succeeded,
the already allocated data leaked up until now. Fix this by setting the
FF_CODEC_CAP_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavcodec/mobiclip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c
index 25a7f0ed14..8758e7f617 100644
--- a/libavcodec/mobiclip.c
+++ b/libavcodec/mobiclip.c
@@ -1436,4 +1436,5 @@ AVCodec ff_mobiclip_decoder = {
.flush = mobiclip_flush,
.close = mobiclip_close,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};
--
2.25.1
More information about the ffmpeg-devel
mailing list