diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-07-19 17:13:40 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-07-19 17:13:40 +0000 |
commit | 0b8d66289f7e96c449bb88e7ec20a5860fba18ee (patch) | |
tree | 60a07f1fab84453afd86aa43b3052fb0b94efd3d /src/cache_iterators.c | |
parent | 9479a701b5185f5f5ad4ddf14ac37b847aa979dd (diff) | |
download | conntrack-tools-0b8d66289f7e96c449bb88e7ec20a5860fba18ee.tar.gz conntrack-tools-0b8d66289f7e96c449bb88e7ec20a5860fba18ee.zip |
- simplify cache_flush function: use cache_del()
Diffstat (limited to 'src/cache_iterators.c')
-rw-r--r-- | src/cache_iterators.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/cache_iterators.c b/src/cache_iterators.c index 1d1b2e8..36f7364 100644 --- a/src/cache_iterators.c +++ b/src/cache_iterators.c @@ -148,18 +148,8 @@ static int do_flush(void *data1, void *data2) { struct cache *c = data1; struct us_conntrack *u = data2; - void *data = u->data; - int i; - - for (i = 0; i < c->num_features; i++) { - c->features[i]->destroy(u, data); - data += c->features[i]->size; - } - - if (c->extra && c->extra->destroy) - c->extra->destroy(u, ((void *) u) + c->extra_offset); - free(u->ct); + cache_del(c, u->ct); return 0; } @@ -167,6 +157,5 @@ static int do_flush(void *data1, void *data2) void cache_flush(struct cache *c) { hashtable_iterate(c->h, c, do_flush); - hashtable_flush(c->h); c->flush++; } |