From 1f7a33f7c7043bf5feabd138e2349544e86f87c3 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Mon, 19 Jul 2010 12:21:24 +0100 Subject: Without this we leak an fd on each domain shutdown and eventually run out of file descriptors meaning new the console of new domains are not logged. Seems to have been accidentally removed in 16638:28921e83000b. Signed-off-by: Ian Campbell --- tools/console/daemon/io.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/console') diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 7688a1a9e4..2fd9b523d8 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -747,6 +747,11 @@ static void cleanup_domain(struct domain *d) { domain_close_tty(d); + if (d->log_fd != -1) { + close(d->log_fd); + d->log_fd = -1; + } + free(d->buffer.data); d->buffer.data = NULL; -- cgit v1.2.3