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-Tag: 5.1.0rc1~10^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ccc5bb216752a1cd3617de052ad1e0b49b41fa9;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 e51f02c056..38465aebbf 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; }