diff options
author | Martin Willi <martin@strongswan.org> | 2006-10-24 08:46:17 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-10-24 08:46:17 +0000 |
commit | 55bbff11ec96f74b27afc36dd8ca3e34ff425b40 (patch) | |
tree | 9d0ff1aad70e01718405a8da314d22a86b072947 /src/charon/bus | |
parent | 5c4cc9a4e328d86867959dec0e082f7e4f098a6e (diff) | |
download | strongswan-55bbff11ec96f74b27afc36dd8ca3e34ff425b40.tar.bz2 strongswan-55bbff11ec96f74b27afc36dd8ca3e34ff425b40.tar.xz |
linked list cleanups
added list methods invoke(), destroy_offset(), destroy_function()
simplified list destruction when destroying its items
Diffstat (limited to 'src/charon/bus')
-rw-r--r-- | src/charon/bus/bus.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/charon/bus/bus.c b/src/charon/bus/bus.c index 028fd37c9..e207dfa89 100644 --- a/src/charon/bus/bus.c +++ b/src/charon/bus/bus.c @@ -365,14 +365,7 @@ static void signal_(private_bus_t *this, signal_t signal, level_t level, */ static void destroy(private_bus_t *this) { - active_listener_t *listener; - while (this->active_listeners->remove_last(this->active_listeners, - (void**)&listener) == SUCCESS) - { - free(listener); - } - - this->active_listeners->destroy(this->active_listeners); + this->active_listeners->destroy_function(this->active_listeners, free); this->listeners->destroy(this->listeners); free(this); } |