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: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2016-03-11 14:21:56 +01:00
parent 26f3d9c26c
commit 71fa2eb26c

View File

@ -6950,7 +6950,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
{
virQEMUDriverPtr driver = conn->privateData;
virDomainDefPtr def = NULL;
virDomainChrSourceDef monConfig;
virDomainChrSourceDef monConfig = {0};
virQEMUCapsPtr qemuCaps = NULL;
bool monitor_json = false;
virCommandPtr cmd = NULL;