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>
release/6.0
Cameron Gutman 2 years ago committed by Martin Storsjö
parent 431f6260ac
commit 669ff26bc2
  1. 1
      libavcodec/mfenc.c

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

Loading…
Cancel
Save