mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Fix use-after-free in handling domain taint flags
* src/conf/domain_conf.c: Fix use after free
This commit is contained in:
parent
caf808c790
commit
abb82f53ed
@ -6731,12 +6731,13 @@ static virDomainObjPtr virDomainObjParseXML(virCapsPtr caps,
|
||||
char *str = virXMLPropString(nodes[i], "flag");
|
||||
if (str) {
|
||||
int flag = virDomainTaintTypeFromString(str);
|
||||
VIR_FREE(str);
|
||||
if (flag < 0) {
|
||||
virDomainReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unknown taint flag %s"), str);
|
||||
VIR_FREE(str);
|
||||
goto error;
|
||||
}
|
||||
VIR_FREE(str);
|
||||
virDomainObjTaint(obj, flag);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user