aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-07-08 10:39:23 +0200
committerMartin Willi <martin@revosec.ch>2013-07-18 16:00:30 +0200
commitcfdb5f48554018a81b5ebcb77cf5c1b463dedd99 (patch)
tree6ae823fcb1ef5912724a9d9ed8649e119609bdc0 /src
parent46666dd3c1f99a0f94669156c102e727401cf03a (diff)
downloadstrongswan-cfdb5f48554018a81b5ebcb77cf5c1b463dedd99.tar.bz2
strongswan-cfdb5f48554018a81b5ebcb77cf5c1b463dedd99.tar.xz
error-notify: fix error handling when creating the socket fails
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/error_notify/error_notify_plugin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcharon/plugins/error_notify/error_notify_plugin.c b/src/libcharon/plugins/error_notify/error_notify_plugin.c
index 9ee3ed69f..ef0ce7bc6 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;