Fix memory leak parsing 'relabel' attribute in domain security XML

* src/conf/domain_conf.c: Free the 'relabel' attribute
This commit is contained in:
Daniel P. Berrange 2011-08-31 16:52:25 +01:00
parent a91d3115b5
commit d07aa6a96f

View File

@ -5300,8 +5300,10 @@ virSecurityLabelDefParseXML(const virDomainDefPtr def,
} else {
virDomainReportError(VIR_ERR_XML_ERROR,
_("invalid security relabel value %s"), p);
VIR_FREE(p);
goto error;
}
VIR_FREE(p);
if (def->seclabel.type == VIR_DOMAIN_SECLABEL_DYNAMIC &&
def->seclabel.norelabel) {
virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED,