On Tue, 30 Apr 2013, Anton Khirnov wrote:

---
libavfilter/vf_drawtext.c |    6 ++++++
1 file changed, 6 insertions(+)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 2989bd5..a22e237 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -402,6 +402,9 @@ static av_cold void uninit(AVFilterContext *ctx)
    DrawTextContext *s = ctx->priv;
    int i;

+    av_expr_free(s->x_pexpr);
+    av_expr_free(s->y_pexpr);
+    av_expr_free(s->d_pexpr);
    av_freep(&s->expanded_text);
    av_freep(&s->positions);
    av_tree_enumerate(s->glyphs, NULL, NULL, glyph_enu_free);
@@ -573,6 +576,9 @@ static int config_input(AVFilterLink *inlink)

    av_lfg_init(&s->prng, av_get_random_seed());

+    av_expr_free(s->x_pexpr);
+    av_expr_free(s->y_pexpr);
+    av_expr_free(s->d_pexpr);
    if ((ret = av_expr_parse(&s->x_pexpr, s->x_expr, var_names,
                             NULL, NULL, fun2_names, fun2, 0, ctx)) < 0 ||
        (ret = av_expr_parse(&s->y_pexpr, s->y_expr, var_names,
--
1.7.10.4

Same as the others, probably needs setting the freed pointers to null.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to