]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If we fail to open kqueue/epoll, abort the loop.
authorRoy Marples <roy@marples.name>
Sat, 27 Feb 2016 17:19:15 +0000 (17:19 +0000)
committerRoy Marples <roy@marples.name>
Sat, 27 Feb 2016 17:19:15 +0000 (17:19 +0000)
eloop.c

diff --git a/eloop.c b/eloop.c
index 3c57f46f27517070709b64fbef773110705e00d0..44448ff641c2597757c50a50b9526a6e000b1677 100644 (file)
--- a/eloop.c
+++ b/eloop.c
@@ -772,7 +772,10 @@ eloop_new(void)
                eloop->exitcode = EXIT_FAILURE;
 #if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL)
                eloop->poll_fd = -1;
-               eloop_open(eloop);
+               if (eloop_open(eloop) == -1) {
+                       eloop_free(eloop);
+                       return NULL;
+               }
 #endif
        }