[PATCH 2/2] conf: Don't leak 'ram' video property on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's only freed on normal returns from virDomainVideoDefParseXML,
but not when erroring out.
---
 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 258ee93..0c75838 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7736,6 +7736,7 @@ virDomainVideoDefParseXML(const xmlNodePtr node,
 error:
     virDomainVideoDefFree(def);
     VIR_FREE(type);
+    VIR_FREE(ram);
     VIR_FREE(vram);
     VIR_FREE(heads);
     return NULL;
-- 
1.8.1.2

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]