mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
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:
parent
75dfbb85c7
commit
c9a8e59440
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user