mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
cpu: Properly report errors when parsing CPU map XML
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
17924643ec
commit
5b62a95176
@ -105,17 +105,8 @@ int cpuMapLoad(const char *arch,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((xml = xmlParseFile(mapfile)) == NULL) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("cannot parse CPU map file: %s"),
|
||||
mapfile);
|
||||
if (!(xml = virXMLParseFileCtxt(mapfile, &ctxt)))
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if ((ctxt = xmlXPathNewContext(xml)) == NULL) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
virBufferAsprintf(&buf, "./arch[@name='%s']", arch);
|
||||
if (virBufferCheckError(&buf) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user