[PATCH 5/5] vmx: avoid memory leak

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

 



* src/vmx/vmx.c: fix memory leak.

Signed-off-by: Alex Jia <ajia@xxxxxxxxxx>
---
 src/vmx/vmx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index dff3599..1ab15b7 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1253,6 +1253,7 @@ virVMXParseConfig(virVMXContext *ctx, virCapsPtr caps, const char *vmx)
     /* Allocate domain def */
     if (VIR_ALLOC(def) < 0) {
         virReportOOMError();
+        virConfFree(conf);
         return NULL;
     }
 
-- 
1.7.1

--
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]