diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-06-25 19:00:00 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-06-25 19:00:00 +0200 |
commit | 63afd833b929803842ed2ca996f6d5f41b7a3746 (patch) | |
tree | c1e5b40b49f55086eebe6ada7ddca31f00994f2a /src | |
parent | f97c269e0cf19bb0fcf2fdb77820778653f58964 (diff) | |
download | strongswan-63afd833b929803842ed2ca996f6d5f41b7a3746.tar.bz2 strongswan-63afd833b929803842ed2ca996f6d5f41b7a3746.tar.xz |
Avoid SIGSEGV during shutdown if charon is not started as root
Diffstat (limited to 'src')
-rw-r--r-- | src/libhydra/kernel/kernel_interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libhydra/kernel/kernel_interface.c b/src/libhydra/kernel/kernel_interface.c index 573557506..b6bc5d92e 100644 --- a/src/libhydra/kernel/kernel_interface.c +++ b/src/libhydra/kernel/kernel_interface.c @@ -362,7 +362,7 @@ METHOD(kernel_interface_t, add_ipsec_interface, void, METHOD(kernel_interface_t, remove_ipsec_interface, void, private_kernel_interface_t *this, kernel_ipsec_constructor_t constructor) { - if (constructor == this->ipsec_constructor) + if (constructor == this->ipsec_constructor && this->ipsec) { this->ipsec->destroy(this->ipsec); this->ipsec = NULL; @@ -382,7 +382,7 @@ METHOD(kernel_interface_t, add_net_interface, void, METHOD(kernel_interface_t, remove_net_interface, void, private_kernel_interface_t *this, kernel_net_constructor_t constructor) { - if (constructor == this->net_constructor) + if (constructor == this->net_constructor && this->net) { this->net->destroy(this->net); this->net = NULL; |