From bc9d9823307a520e572638e2ea4da6cf74e7b286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Fri, 1 Nov 2024 14:10:20 +0100 Subject: [PATCH] encode_lavc: fix memory leak on --ofopts=help Found by OSS-Fuzz. --- common/encode_lavc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/encode_lavc.c b/common/encode_lavc.c index 33743007dd..0e94c0a4d8 100644 --- a/common/encode_lavc.c +++ b/common/encode_lavc.c @@ -546,7 +546,7 @@ bool encode_lavc_showhelp(struct mp_log *log, struct encode_opts *opts) encode_lavc_printoptions(log, c, " --ofopts=", " ", NULL, AV_OPT_FLAG_ENCODING_PARAM, AV_OPT_FLAG_ENCODING_PARAM); - av_free(c); + avformat_free_context(c); void *iter = NULL; while ((format = av_muxer_iterate(&iter))) { if (format->priv_class) {