diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-08-02 11:16:31 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-08-02 11:16:31 +0100 |
commit | 2e82f5311b72234b2ab49f4ef55006eed94f8d0c (patch) | |
tree | 91b97b9136b16be3795c1cf7cdc089677c381452 | |
parent | d7ac3b29bdc901b867007550a2bbdcc0fce03fe9 (diff) | |
download | xen-2e82f5311b72234b2ab49f4ef55006eed94f8d0c.tar.gz xen-2e82f5311b72234b2ab49f4ef55006eed94f8d0c.tar.bz2 xen-2e82f5311b72234b2ab49f4ef55006eed94f8d0c.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>
xen-unstable changeset: 21818:9ccd024065c5
xen-unstable date: Mon Jul 19 12:21:24 2010 +0100
-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 22833d7469..61b268764d 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -748,6 +748,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; |