From eb93d168147d772e4abd73d1ae03fbff9ed5410d Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Tue, 17 Sep 2024 14:40:45 +0200 Subject: [PATCH] filterx/expr-compound: fix leaking list of statements Signed-off-by: Attila Szakacs --- lib/filterx/expr-compound.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/filterx/expr-compound.c b/lib/filterx/expr-compound.c index 0956ec36b7..9a0bc144a0 100644 --- a/lib/filterx/expr-compound.c +++ b/lib/filterx/expr-compound.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2024 Attila Szakacs + * Copyright (c) 2024 Axoflow + * Copyright (c) 2024 Attila Szakacs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -146,6 +147,7 @@ filterx_compound_expr_add(FilterXExpr *s, FilterXExpr *expr) g_ptr_array_add(self->exprs, expr); } +/* Takes reference of expr_list */ void filterx_compound_expr_add_list(FilterXExpr *s, GList *expr_list) { @@ -153,6 +155,7 @@ filterx_compound_expr_add_list(FilterXExpr *s, GList *expr_list) { filterx_compound_expr_add(s, elem->data); } + g_list_free(expr_list); } FilterXExpr *