kernel-netlink: Make sure we successfully opened a Netlink socket

This is in addition to the fix in the destructor in 991e9e5dc9.
This commit is contained in:
Tobias Brunner
2020-12-03 08:34:18 +01:00
parent e8fae43768
commit 9248f636b0
@@ -3159,6 +3159,12 @@ kernel_netlink_net_t *kernel_netlink_net_create()
check_kernel_features(this);
if (!this->socket)
{
destroy(this);
return NULL;
}
if (streq(lib->ns, "starter"))
{ /* starter has no threads, so we do not register for kernel events */
register_for_events = FALSE;