From: Stefano Stabellini Date: Mon, 19 Jul 2010 11:21:24 +0000 (+0100) Subject: Without this we leak an fd on each domain shutdown and eventually run X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11759^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1f7a33f7c7043bf5feabd138e2349544e86f87c3;p=xen.git 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 --- 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;