diff --git a/src/unix/linux-core.c b/src/unix/linux-core.c index 991d1c60aee..3341b94e1f2 100644 --- a/src/unix/linux-core.c +++ b/src/unix/linux-core.c @@ -170,6 +170,7 @@ int uv__io_check_fd(uv_loop_t* loop, int fd) { struct epoll_event e; int rc; + memset(&e, 0, sizeof(e)); e.events = POLLIN; e.data.fd = -1; @@ -218,6 +219,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { return; } + memset(&e, 0, sizeof(e)); + while (!QUEUE_EMPTY(&loop->watcher_queue)) { q = QUEUE_HEAD(&loop->watcher_queue); QUEUE_REMOVE(q);