mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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)
This commit is contained in:
parent
71753cb7f7
commit
abfa97a225
@ -92,6 +92,8 @@ virConsoleShutdown(virConsolePtr con)
|
|||||||
{
|
{
|
||||||
con->quit = true;
|
con->quit = true;
|
||||||
virStreamEventRemoveCallback(con->st);
|
virStreamEventRemoveCallback(con->st);
|
||||||
|
if (con->st)
|
||||||
|
virStreamFree(con->st);
|
||||||
if (con->stdinWatch != -1)
|
if (con->stdinWatch != -1)
|
||||||
virEventRemoveHandle(con->stdinWatch);
|
virEventRemoveHandle(con->stdinWatch);
|
||||||
if (con->stdinWatch != -1)
|
if (con->stdinWatch != -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user