Skip to content

Commit

Permalink
[NETFILTER] Free layer-3 specific protocol tables at cleanup
Browse files Browse the repository at this point in the history
Although the comment around the allocation code tells us that
the layer-3 specific protocol tables will be freed when cleaning up,
they aren't. And this makes nfsim complain loudly...

Signed-off-by: KOVACS Krisztian <hidden@balabit.hu>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
KOVACS Krisztian authored and David S. Miller committed Nov 16, 2005
1 parent 9647937 commit 5a6f294
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,13 @@ void nf_conntrack_cleanup(void)
kmem_cache_destroy(nf_conntrack_expect_cachep);
free_conntrack_hash(nf_conntrack_hash, nf_conntrack_vmalloc,
nf_conntrack_htable_size);

/* free l3proto protocol tables */
for (i = 0; i < PF_MAX; i++)
if (nf_ct_protos[i]) {
kfree(nf_ct_protos[i]);
nf_ct_protos[i] = NULL;
}
}

static struct list_head *alloc_hashtable(int size, int *vmalloced)
Expand Down

0 comments on commit 5a6f294

Please sign in to comment.