mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
qemu: virConnectGetVersion returns bogus value
The unitialized local variable qemuVersion can cause an random value
to be returned for the hypervisor version, observable with virsh version.
Introduced by commit b46f7f4a0b
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
parent
0a562de1ff
commit
adfa3469bb
@ -1382,7 +1382,7 @@ cleanup:
|
|||||||
static int qemuGetVersion(virConnectPtr conn, unsigned long *version) {
|
static int qemuGetVersion(virConnectPtr conn, unsigned long *version) {
|
||||||
virQEMUDriverPtr driver = conn->privateData;
|
virQEMUDriverPtr driver = conn->privateData;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
unsigned int qemuVersion;
|
unsigned int qemuVersion = 0;
|
||||||
virCapsPtr caps = NULL;
|
virCapsPtr caps = NULL;
|
||||||
|
|
||||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
||||||
|
Loading…
Reference in New Issue
Block a user