[FFmpeg-devel] [PATCH] avfilter/drawtext: fix memory leak when using "reinit" runtime command
Steven Zhou
steven.zhou at netint.ca
Sat Nov 23 03:20:36 EET 2024
Free AVOption in drawtext private context when freeing old copy of drawtext
private context during processing of "reinit" runtime command.
Signed-off-by: Steven Zhou <steven.zhou at netint.ca>
---
libavfilter/vf_drawtext.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 8de24625d6..038646b112 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1226,6 +1226,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
ctx->priv = old;
uninit(ctx);
+ av_opt_free(old);
av_freep(&old);
ctx->priv = new;
--
2.17.1
More information about the ffmpeg-devel
mailing list