Unverified Commit b4fde4ec by Christian Brauner Committed by GitHub

Merge pull request #3235 from xinhua9569/master

fd: only add valid fd to mainloop
parents c7ba8828 4879faff
...@@ -65,6 +65,8 @@ int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd, ...@@ -65,6 +65,8 @@ int lxc_mainloop_add_handler(struct lxc_epoll_descr *descr, int fd,
struct epoll_event ev; struct epoll_event ev;
struct mainloop_handler *handler; struct mainloop_handler *handler;
struct lxc_list *item; struct lxc_list *item;
if (fd < 0)
return -1;
handler = malloc(sizeof(*handler)); handler = malloc(sizeof(*handler));
if (!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