From 3cf37700cd44c748fd72a3cd5e392e948f0bb4b1 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 1 Mar 2011 14:59:45 +0000 Subject: [PATCH] Ensure stream is aborted when exiting console After running 'virsh console' in interactive mode, there was a missing call to virStreamAbort, which meant the server kept the stream resources open * tools/console.c: Abort stream when exiting --- tools/console.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/console.c b/tools/console.c index 171ebc9845..82ef537003 100644 --- a/tools/console.c +++ b/tools/console.c @@ -90,9 +90,11 @@ static void virConsoleShutdown(virConsolePtr con) { con->quit = true; - virStreamEventRemoveCallback(con->st); - if (con->st) + if (con->st) { + virStreamEventRemoveCallback(con->st); + virStreamAbort(con->st); virStreamFree(con->st); + } if (con->stdinWatch != -1) virEventRemoveHandle(con->stdinWatch); if (con->stdoutWatch != -1) -- 2.47.2