diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index bbc9d9c12c..26174232da 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -957,7 +957,7 @@ static void lxcEpollIO(int watch, int fd, int events, void *opaque) int ret; ret = epoll_wait(console->epollFd, &event, 1, 0); if (ret < 0) { - if (ret == EINTR) + if (errno == EINTR) continue; virReportSystemError(errno, "%s", _("Unable to wait on epoll")); @@ -1101,7 +1101,7 @@ static int lxcControllerMain(int serverFd, size_t nFds, pid_t container) { - struct lxcConsole *consoles; + struct lxcConsole *consoles = NULL; struct lxcMonitor monitor = { .serverFd = serverFd, .clientFd = clientFd, diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 909b8e8a76..7e7affd75a 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -1409,7 +1409,7 @@ static int lxcMonitorClient(lxc_driver_t * driver, virDomainObjPtr vm) { char *sockpath = NULL; - int fd; + int fd = -1; struct sockaddr_un addr; if (virAsprintf(&sockpath, "%s/%s.sock",