From: Martin Willi Date: Mon, 8 Jul 2013 08:52:49 +0000 (+0200) Subject: whitelist: fix error handling when creating the socket fails X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb04785eb8b55067ce0984dcee276a6aec052497;p=thirdparty%2Fstrongswan.git whitelist: fix error handling when creating the socket fails --- diff --git a/src/libcharon/plugins/whitelist/whitelist_plugin.c b/src/libcharon/plugins/whitelist/whitelist_plugin.c index 4f397d76e8..548bf54b36 100644 --- a/src/libcharon/plugins/whitelist/whitelist_plugin.c +++ b/src/libcharon/plugins/whitelist/whitelist_plugin.c @@ -108,7 +108,13 @@ plugin_t *whitelist_plugin_create() }, .listener = whitelist_listener_create(), ); + this->control = whitelist_control_create(this->listener); + if (!this->control) + { + destroy(this); + return NULL; + } return &this->public.plugin; }