提交 abfa97a2 编写于 作者: O Osier Yang

virsh: Free stream when shutdown console

Otherwise connection of hypervisor driver will be leaked when
one shutdown the guest in console. e.g.

[root@localhost]# init 0
......
init: Re-executing /sbin/init
Halting system...
Power down.

error: Failed to disconnect from the hypervisor, 1 leaked reference(s)
上级 71753cb7
......@@ -92,6 +92,8 @@ virConsoleShutdown(virConsolePtr con)
{
con->quit = true;
virStreamEventRemoveCallback(con->st);
if (con->st)
virStreamFree(con->st);
if (con->stdinWatch != -1)
virEventRemoveHandle(con->stdinWatch);
if (con->stdinWatch != -1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册