error-notify: fix error handling when creating the socket fails

This commit is contained in:
Martin Willi
2013-07-18 16:00:30 +02:00
parent 46666dd3c1
commit cfdb5f4855
@@ -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;