mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
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:
parent
26f3d9c26c
commit
71fa2eb26c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user