mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +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,7 +127,8 @@ vmwareCapsInit(void)
|
||||
|
||||
cleanup:
|
||||
virCPUDefFree(cpu);
|
||||
cpuDataFree(caps->host.arch, data);
|
||||
if (caps)
|
||||
cpuDataFree(caps->host.arch, data);
|
||||
|
||||
return caps;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user