xen: Resolve Coverity FORWARD_NULL

Coverity found that xenXMConfigCacheAddFile has an error path in which
no error message and a -1 was not returned which could have resulted in
a NULL dereference in a VIR_DEBUG statement and of course an erroneous
0 value returned!
This commit is contained in:
John Ferlan 2015-05-04 12:00:40 -04:00
parent 75dfbb85c7
commit c9a8e59440

View File

@ -279,6 +279,9 @@ xenXMConfigCacheAddFile(virConnectPtr conn, const char *filename)
virDomainDefFree(entry->def);
VIR_FREE(entry->filename);
VIR_FREE(entry);
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("xenXMConfigCacheRefresh: virHashAddEntry name"));
return -1;
}
}
VIR_DEBUG("Added config %s %s", entry->def->name, filename);