mirror of
https://github.com/anrieff/libcpuid
synced 2025-01-23 20:06:41 +00:00
Fix cpuid_get_hypervisor when NULL data is provided
The data should be loaded into the local variable `mydata`, not into the NULL parameter.
This commit is contained in:
parent
e66eee8c6b
commit
550efe1a32
1 changed files with 1 additions and 1 deletions
|
@ -1748,7 +1748,7 @@ hypervisor_vendor_t cpuid_get_hypervisor(struct cpu_raw_data_t* raw, struct cpu_
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
if ((r = cpu_identify(raw, data)) < 0)
|
if ((r = cpu_identify(raw, &mydata)) < 0)
|
||||||
return HYPERVISOR_UNKNOWN;
|
return HYPERVISOR_UNKNOWN;
|
||||||
data = &mydata;
|
data = &mydata;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue