1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-23 04:24:35 +02:00

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>
This commit is contained in:
Cameron Gutman 2023-01-20 19:20:30 -06:00 committed by Martin Storsjö
parent 431f6260ac
commit 669ff26bc2

View File

@ -1214,7 +1214,6 @@ static int mf_init(AVCodecContext *avctx)
return 0;
}
}
mf_close(avctx);
return ret;
}