Skip to content

Commit

Permalink
filterx/expr-compound: fix leaking list of statements
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
  • Loading branch information
alltilla committed Sep 17, 2024
1 parent f895bfd commit eb93d16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/filterx/expr-compound.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2024 Attila Szakacs
* Copyright (c) 2024 Axoflow
* Copyright (c) 2024 Attila Szakacs <attila.szakacs@axoflow.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -146,13 +147,15 @@ 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)
{
for (GList *elem = expr_list; elem; elem = elem->next)
{
filterx_compound_expr_add(s, elem->data);
}
g_list_free(expr_list);
}

FilterXExpr *
Expand Down

0 comments on commit eb93d16

Please sign in to comment.