Coverity points out that the return from virDomainDefParseString is not checked in xenapiDomainCreateXML like it should be which could end up in a pointer dereference
Signed-off-by: John Ferlan <jfer...@redhat.com> --- src/xenapi/xenapi_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index 821e9d9..148ff9b 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -560,6 +560,8 @@ xenapiDomainCreateXML(virConnectPtr conn, priv->caps, priv->xmlopt, 1 << VIR_DOMAIN_VIRT_XEN, parse_flags); + if (!defPtr) + return NULL; createVMRecordFromXml(conn, defPtr, &record, &vm); virDomainDefFree(defPtr); if (record) { -- 2.1.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list