diff options
author | Phil Sutter <phil@nwl.cc> | 2018-04-13 16:52:26 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-04-14 13:53:02 +0200 |
commit | 438dddb2146f21c971e552753c7e9488e3c8b193 (patch) | |
tree | 56107a9983c6a0c7f52b22a781b4b88e179a6d48 /src | |
parent | 6e4bbbb278a50e61b6c219680004e7bd4480137c (diff) |
rule: Free table->objs in table_free()
This fixes a memory leak identified by valgrind.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/rule.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -812,6 +812,7 @@ void table_free(struct table *table) { struct chain *chain, *next; struct set *set, *nset; + struct obj *obj, *nobj; if (--table->refcnt > 0) return; @@ -819,6 +820,8 @@ void table_free(struct table *table) chain_free(chain); list_for_each_entry_safe(set, nset, &table->sets, list) set_free(set); + list_for_each_entry_safe(obj, nobj, &table->objs, list) + obj_free(obj); handle_free(&table->handle); scope_release(&table->scope); xfree(table); |