We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c49e4c1 commit 4790675Copy full SHA for 4790675
python-ethtool/netlink.c
@@ -58,7 +58,9 @@ int open_netlink(PyEtherInfo *ethi)
58
/* No earlier connections exists, establish a new one */
59
nlconnection = nl_socket_alloc();
60
if( nlconnection != NULL ) {
61
- nl_connect(nlconnection, NETLINK_ROUTE);
+ if( nl_connect(nlconnection, NETLINK_ROUTE) < 0 ) {
62
+ return 0;
63
+ }
64
/* Force O_CLOEXEC flag on the NETLINK socket */
65
if( fcntl(nl_socket_get_fd(nlconnection), F_SETFD, FD_CLOEXEC) == -1 ) {
66
fprintf(stderr,
0 commit comments