提交 71fa2eb2 编写于 作者: M Martin Kletzander

qemu: Don't access uninitialized memory

In qemuConnectDomainXMLToNative() we set up the monitor, but we never
memset() it to zeros.  Thanks to the introduction of the logfile
parameter of chardevs (and the logfile member of the struct), we started
checking whether that's non-NULL and that exposed this old error.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 26f3d9c2
...@@ -6950,7 +6950,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn, ...@@ -6950,7 +6950,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
{ {
virQEMUDriverPtr driver = conn->privateData; virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL; virDomainDefPtr def = NULL;
virDomainChrSourceDef monConfig; virDomainChrSourceDef monConfig = {0};
virQEMUCapsPtr qemuCaps = NULL; virQEMUCapsPtr qemuCaps = NULL;
bool monitor_json = false; bool monitor_json = false;
virCommandPtr cmd = NULL; virCommandPtr cmd = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册