diff options
author | Stefano Stabellini <sstabellini@xensource.com> | 2010-07-19 12:21:24 +0100 |
---|---|---|
committer | Stefano Stabellini <sstabellini@xensource.com> | 2010-07-19 12:21:24 +0100 |
commit | 1f7a33f7c7043bf5feabd138e2349544e86f87c3 (patch) | |
tree | d4685afd614fbd6dcbf50a8860b84600d4860606 | |
parent | 870648146f69bcd7886b5dbbb25ad80ba1c43f56 (diff) | |
download | xen-1f7a33f7c7043bf5feabd138e2349544e86f87c3.tar.gz xen-1f7a33f7c7043bf5feabd138e2349544e86f87c3.tar.bz2 xen-1f7a33f7c7043bf5feabd138e2349544e86f87c3.zip |
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 <ian.campbell@citrix.com>
-rw-r--r-- | tools/console/daemon/io.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |