From d07aa6a96fc2e047666f7efb3c643d8aadd27287 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 31 Aug 2011 16:52:25 +0100 Subject: [PATCH] Fix memory leak parsing 'relabel' attribute in domain security XML * src/conf/domain_conf.c: Free the 'relabel' attribute --- src/conf/domain_conf.c | 2 ++ 1 file changed, 2 insertions(+) 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, -- 2.47.3