[libvirt] [PATCH 2/8] virDomainDefParseXML: Free @tmp

Michal Privoznik posted 8 patches 7 years, 9 months ago
[libvirt] [PATCH 2/8] virDomainDefParseXML: Free @tmp
Posted by Michal Privoznik 7 years, 9 months ago
When parsing <ioapic> feature we're using @tmp to store some
temporary string but never free it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/conf/domain_conf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 8168dc52f..3cdb5e348 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17892,6 +17892,7 @@ virDomainDefParseXML(xmlDocPtr xml,
                 }
                 def->ioapic = value;
                 def->features[val] = VIR_TRISTATE_SWITCH_ON;
+                VIR_FREE(tmp);
             }
             ctxt->node = node;
             break;
-- 
2.13.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/8] virDomainDefParseXML: Free @tmp
Posted by Peter Krempa 7 years, 9 months ago
On Fri, Aug 04, 2017 at 16:22:30 +0200, Michal Privoznik wrote:
> When parsing <ioapic> feature we're using @tmp to store some
> temporary string but never free it.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  src/conf/domain_conf.c | 1 +
>  1 file changed, 1 insertion(+)

ACK
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list