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;