diff --git a/LibOS/shim/src/sys/shim_epoll.c b/LibOS/shim/src/sys/shim_epoll.c index 0bb135d7..f183c91d 100644 --- a/LibOS/shim/src/sys/shim_epoll.c +++ b/LibOS/shim/src/sys/shim_epoll.c @@ -256,11 +256,13 @@ int shim_do_epoll_ctl (int epfd, int op, int fd, lock(&hdl->lock); LISTP_DEL(epoll_fd, &hdl->epolls, back); unlock(&hdl->lock); - put_handle(epoll_hdl); debug("delete handle %p from epoll handle %p\n", hdl, epoll); + put_handle(epoll_hdl); + put_handle(hdl); + LISTP_DEL(epoll_fd, &epoll->fds, list); epoll->nfds--; free(epoll_fd);