Unverified Commit 619670be by dongxinhua Committed by Christian Brauner

fd: only add valid fd to mainloop

parent c2c87fed
......@@ -65,6 +65,8 @@ int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd,
struct epoll_event ev;
struct mainloop_handler *handler;
struct lxc_list *item;
if (fd < 0)
return -1;
handler = malloc(sizeof(*handler));
if (!handler)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment