提交 185478af 编写于 作者: J John Ferlan 提交者: Eric Blake

vmware: Avoid NULL dereference for 'caps'

When virCapabilitiesNew() fails, caps will be NULL resulting in possible
core when deref'd in cpuDataFree() call.
上级 f36d83c4
...@@ -127,6 +127,7 @@ vmwareCapsInit(void) ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册