From: Daniel P. Berrange Date: Tue, 1 Mar 2011 14:59:45 +0000 (+0000) Subject: Ensure stream is aborted when exiting console X-Git-Tag: v0.9.5-rc1~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cf37700cd44c748fd72a3cd5e392e948f0bb4b1;p=thirdparty%2Flibvirt.git 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 --- 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)