The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3235
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: dongxinhua <dongxin...@huawei.com>
From c62e88dd54bdb4e9f74642c716ca720313adda41 Mon Sep 17 00:00:00 2001 From: dongxinhua <dongxin...@huawei.com> Date: Sat, 21 Dec 2019 17:44:40 +0800 Subject: [PATCH] fd: only add valid fd to mainloop Signed-off-by: dongxinhua <dongxin...@huawei.com> --- src/lxc/mainloop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/mainloop.c b/src/lxc/mainloop.c index b169aa6fe2..30ce624045 100644 --- a/src/lxc/mainloop.c +++ b/src/lxc/mainloop.c @@ -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 0; handler = malloc(sizeof(*handler)); if (!handler)
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel