mirror of https://gitee.com/openkylin/libvirt.git
virsh: console: Avoid using stream after being freed.
The stream object wasn't set to NULL after freeing causing a double free attempt on the cleanup path.
This commit is contained in:
parent
2b01761d5e
commit
e3b8808ba7
|
@ -101,6 +101,7 @@ virConsoleShutdown(virConsolePtr con)
|
|||
virStreamEventRemoveCallback(con->st);
|
||||
virStreamAbort(con->st);
|
||||
virStreamFree(con->st);
|
||||
con->st = NULL;
|
||||
}
|
||||
VIR_FREE(con->streamToTerminal.data);
|
||||
VIR_FREE(con->terminalToStream.data);
|
||||
|
|
Loading…
Reference in New Issue