From: Roy Marples Date: Sun, 7 Jun 2020 22:39:46 +0000 (+0100) Subject: eloop: if we take a free event, add it to the main queue X-Git-Tag: v9.1.2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a721c35e5fbe66fbcb2478b0af8f7aee9f361b5;p=thirdparty%2Fdhcpcd.git eloop: if we take a free event, add it to the main queue Otherwise it goes into the ether.... --- diff --git a/src/eloop.c b/src/eloop.c index 39c43d9d..5abd0f86 100644 --- a/src/eloop.c +++ b/src/eloop.c @@ -326,8 +326,8 @@ eloop_event_add_rw(struct eloop *eloop, int fd, e = malloc(sizeof(*e)); if (e == NULL) return -1; - TAILQ_INSERT_HEAD(&eloop->events, e, next); } + TAILQ_INSERT_HEAD(&eloop->events, e, next); e->fd = fd; eloop->nevents++; }