提交 62b2c2fc 编写于 作者: M Marc Hartmayer 提交者: Laine Stump

qemu: Check if virQEMUCapsNewCopy(...) has failed

Check if virQEMUCapsNewCopy(...) has failed, thus a segmentation fault
in virQEMUCapsFilterByMachineType(...) will be avoided.
Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
上级 728c0e5d
......@@ -4928,6 +4928,10 @@ virQEMUCapsCacheLookupCopy(virCapsPtr caps,
ret = virQEMUCapsNewCopy(qemuCaps);
virObjectUnref(qemuCaps);
if (!ret)
return NULL;
virQEMUCapsFilterByMachineType(ret, machineType);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册