aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorCameron Gutman <aicommander@gmail.com>2023-01-20 19:20:30 -0600
committerMartin Storsjö <martin@martin.st>2023-01-31 14:39:25 +0200
commit669ff26bc283c39334e7df3a81fd0db0088a7442 (patch)
treeeca7749ea126b0da2543625c669b0b34dbc4a4b5 /libavcodec
parent431f6260ac6408fdccfe06dd5276084b17c3557f (diff)
downloadffmpeg-669ff26bc283c39334e7df3a81fd0db0088a7442.tar.gz
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mfenc.c1
1 files changed, 0 insertions, 1 deletions
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;
}