summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rule.c b/src/rule.c
index f2b714e..4b5ffa6 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -64,6 +64,11 @@ EXPORT_SYMBOL(nft_rule_alloc);
void nft_rule_free(struct nft_rule *r)
{
+ struct nft_rule_expr *e, *tmp;
+
+ list_for_each_entry_safe(e, tmp, &r->expr_list, head)
+ nft_rule_expr_free(e);
+
if (r->table != NULL)
xfree(r->table);
if (r->chain != NULL)