From 359063caf76a1f892801349f21159f290f42d683 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 24 Jun 2010 10:34:48 +0200 Subject: [PATCH] Flush and destroy the send queue before unloading the socket plugins. --- src/libcharon/daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c index a8e5f19b1..09eec7ef8 100644 --- a/src/libcharon/daemon.c +++ b/src/libcharon/daemon.c @@ -104,6 +104,7 @@ static void destroy(private_daemon_t *this) this->public.ike_sa_manager->flush(this->public.ike_sa_manager); } DESTROY_IF(this->public.receiver); + DESTROY_IF(this->public.sender); /* unload plugins to release threads */ lib->plugins->unload(lib->plugins); #ifdef CAPABILITIES_LIBCAP @@ -122,7 +123,6 @@ static void destroy(private_daemon_t *this) #endif /* ME */ DESTROY_IF(this->public.backends); DESTROY_IF(this->public.credentials); - DESTROY_IF(this->public.sender); DESTROY_IF(this->public.socket); /* wait until all threads are gone */ DESTROY_IF(this->public.processor);