aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/bus/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/bus/bus.c')
-rw-r--r--src/charon/bus/bus.c9
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);
}