mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
cpu: Properly report errors when parsing CPU map XML
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user