mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-04 20:15:19 +00:00
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.
(cherry picked from commit e3b8808ba7
)
This commit is contained in:
parent
20d781692a
commit
c02482bdd8
@ -101,6 +101,7 @@ virConsoleShutdown(virConsolePtr con)
|
|||||||
virStreamEventRemoveCallback(con->st);
|
virStreamEventRemoveCallback(con->st);
|
||||||
virStreamAbort(con->st);
|
virStreamAbort(con->st);
|
||||||
virStreamFree(con->st);
|
virStreamFree(con->st);
|
||||||
|
con->st = NULL;
|
||||||
}
|
}
|
||||||
VIR_FREE(con->streamToTerminal.data);
|
VIR_FREE(con->streamToTerminal.data);
|
||||||
VIR_FREE(con->terminalToStream.data);
|
VIR_FREE(con->terminalToStream.data);
|
||||||
|
Loading…
Reference in New Issue
Block a user