fixed shutdown order to prevent crash when kernel interface schedules events
authorMartin Willi <martin@strongswan.org>
Wed, 12 Sep 2007 07:12:25 +0000 (07:12 -0000)
committerMartin Willi <martin@strongswan.org>
Wed, 12 Sep 2007 07:12:25 +0000 (07:12 -0000)
src/charon/daemon.c

index 08940a2..9ef80a6 100644 (file)
@@ -174,11 +174,11 @@ static void destroy(private_daemon_t *this)
        this->public.processor->set_threads(this->public.processor, 0);
        /* close all IKE_SAs */
        DESTROY_IF(this->public.ike_sa_manager);
+       DESTROY_IF(this->public.kernel_interface);
        DESTROY_IF(this->public.scheduler);
        DESTROY_IF(this->public.interfaces);
        DESTROY_IF(this->public.backends);
        DESTROY_IF(this->public.credentials);
-       DESTROY_IF(this->public.kernel_interface);
        DESTROY_IF(this->public.sender);
        DESTROY_IF(this->public.receiver);
        DESTROY_IF(this->public.socket);