Skip to content

Commit 57a53ad

Browse files
netintstevenjamrial
authored andcommitted
avfilter/drawtext: fix memory leak when using "reinit" runtime command
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@netint.ca> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit d1fa9cf)
1 parent 8a72775 commit 57a53ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libavfilter/vf_drawtext.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
12171217

12181218
ctx->priv = old;
12191219
uninit(ctx);
1220+
av_opt_free(old);
12201221
av_freep(&old);
12211222

12221223
ctx->priv = new;

0 commit comments

Comments
 (0)