From: Roy Marples Date: Sat, 27 Feb 2016 17:19:15 +0000 (+0000) Subject: If we fail to open kqueue/epoll, abort the loop. X-Git-Tag: v6.10.2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2fa1088b4d6693f9468a82002b75de1601714a0;p=thirdparty%2Fdhcpcd.git If we fail to open kqueue/epoll, abort the loop. --- diff --git a/eloop.c b/eloop.c index 3c57f46f..44448ff6 100644 --- 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 }