mirror of
git://github.com/lxc/lxc
synced 2025-09-04 13:09:34 +00:00
fd: only add valid fd to mainloop
Signed-off-by: dongxinhua <dongxinhua@huawei.com>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user