From: Tobias Brunner Date: Tue, 22 Jun 2010 14:18:22 +0000 (+0200) Subject: Avoid a segmentation fault if opening the Android control socket failed. X-Git-Tag: 4.4.1~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f283520fafa8df21ef8231c3c4f6347516d5729f;p=thirdparty%2Fstrongswan.git Avoid a segmentation fault if opening the Android control socket failed. --- diff --git a/src/libcharon/plugins/android/android_plugin.c b/src/libcharon/plugins/android/android_plugin.c index 8d3a1512e9..0e7e9509af 100644 --- a/src/libcharon/plugins/android/android_plugin.c +++ b/src/libcharon/plugins/android/android_plugin.c @@ -64,10 +64,10 @@ METHOD(plugin_t, destroy, void, &this->handler->handler); charon->credentials->remove_set(charon->credentials, &this->creds->set); charon->bus->remove_listener(charon->bus, &this->logger->listener); - this->service->destroy(this->service); this->creds->destroy(this->creds); this->handler->destroy(this->handler); this->logger->destroy(this->logger); + DESTROY_IF(this->service); free(this); }