mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
vmware: Avoid NULL dereference for 'caps'
When virCapabilitiesNew() fails, caps will be NULL resulting in possible core when deref'd in cpuDataFree() call.
This commit is contained in:
parent
f36d83c441
commit
185478af09
@ -127,6 +127,7 @@ vmwareCapsInit(void)
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virCPUDefFree(cpu);
|
virCPUDefFree(cpu);
|
||||||
|
if (caps)
|
||||||
cpuDataFree(caps->host.arch, data);
|
cpuDataFree(caps->host.arch, data);
|
||||||
|
|
||||||
return caps;
|
return caps;
|
||||||
|
Loading…
Reference in New Issue
Block a user