提交 c02482bd 编写于 作者: P Peter Krempa 提交者: Cole Robinson

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 e3b8808b)
上级 20d78169
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册