[libvirt] [PATCH] Fix memory leak parsing 'relabel' attribute in domain security XML

From: "Daniel P. Berrange" <berrange@redhat.com> * src/conf/domain_conf.c: Free the 'relabel' attribute --- src/conf/domain_conf.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 44212cf..00212db 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, -- 1.7.6

On 08/31/2011 09:55 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@redhat.com>
* src/conf/domain_conf.c: Free the 'relabel' attribute --- src/conf/domain_conf.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (2)
-
Daniel P. Berrange
-
Eric Blake