From: Daniel P. Berrange Date: Wed, 31 Aug 2011 15:52:25 +0000 (+0100) Subject: Fix memory leak parsing 'relabel' attribute in domain security XML X-Git-Tag: v0.9.5-rc1~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d07aa6a96fc2e047666f7efb3c643d8aadd27287;p=thirdparty%2Flibvirt.git Fix memory leak parsing 'relabel' attribute in domain security XML * src/conf/domain_conf.c: Free the 'relabel' attribute --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 44212cf2d0..00212db08b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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,