From: Martin Willi Date: Mon, 8 Jul 2013 08:39:23 +0000 (+0200) Subject: error-notify: fix error handling when creating the socket fails X-Git-Tag: 5.1.0rc1~10^2~15 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=cfdb5f48554018a81b5ebcb77cf5c1b463dedd99;p=thirdparty%2Fstrongswan.git error-notify: fix error handling when creating the socket fails --- diff --git a/src/libcharon/plugins/error_notify/error_notify_plugin.c b/src/libcharon/plugins/error_notify/error_notify_plugin.c index 9ee3ed69f5..ef0ce7bc60 100644 --- a/src/libcharon/plugins/error_notify/error_notify_plugin.c +++ b/src/libcharon/plugins/error_notify/error_notify_plugin.c @@ -109,6 +109,12 @@ plugin_t *error_notify_plugin_create() .socket = error_notify_socket_create(), ); + if (!this->socket) + { + free(this); + return NULL; + } + this->listener = error_notify_listener_create(this->socket); return &this->public.plugin;