Commit 4879faff by dongxinhua

fd: only add valid fd to mainloop

parent 3c3fab00
......@@ -84,6 +84,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