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
1 changed files with 1 additions and 0 deletions

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