diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index cf91930365885901a61a3c26752b657a8f2945c5..c51ac4e75261ce4a606a7b91f22311e67fd3fc47 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -115,6 +115,13 @@ virCPUDefParseXML(const xmlNodePtr node, int n; unsigned int i; + if (!xmlStrEqual(node->name, BAD_CAST "cpu")) { + virCPUReportError(VIR_ERR_INTERNAL_ERROR, + "%s", + _("XML does not contain expected 'cpu' element")); + return NULL; + } + if (VIR_ALLOC(def) < 0) { virReportOOMError(); return NULL;