avcodec/mfenc: fix double-free on init failure
ffmpeg | branch: master | Cameron Gutman <aicommander@gmail.com> | Fri Jan 20 19:20:30 2023 -0600| [669ff26bc283c39334e7df3a81fd0db0088a7442] | committer: Martin Storsjö avcodec/mfenc: fix double-free on init failure mfenc sets FF_CODEC_CAP_INIT_CLEANUP, so calling mf_close() on failure inside mf_init() results in a double-free. Signed-off-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=669ff26bc283c39334...
libavcodec/mfenc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c index 36a6d8482d..f3415df10b 100644 --- a/libavcodec/mfenc.c +++ b/libavcodec/mfenc.c @@ -1214,7 +1214,6 @@ static int mf_init(AVCodecContext *avctx) return 0; } } - mf_close(avctx); return ret; }
participants (1)
-
Cameron Gutman