mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00: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;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((xml = xmlParseFile(mapfile)) == NULL) {
|
if (!(xml = virXMLParseFileCtxt(mapfile, &ctxt)))
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("cannot parse CPU map file: %s"),
|
|
||||||
mapfile);
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
|
||||||
|
|
||||||
if ((ctxt = xmlXPathNewContext(xml)) == NULL) {
|
|
||||||
virReportOOMError();
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
virBufferAsprintf(&buf, "./arch[@name='%s']", arch);
|
virBufferAsprintf(&buf, "./arch[@name='%s']", arch);
|
||||||
if (virBufferCheckError(&buf) < 0)
|
if (virBufferCheckError(&buf) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user