1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +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.
This commit is contained in:
Peter Krempa 2012-08-03 13:16:24 +02:00
parent 2b01761d5e
commit e3b8808ba7

View File

@ -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);