[PATCH] qemu: Fix the memory leak

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

 



Found by John Ferlan (coverity script)
---
Assuming an ACK from John, and it's trivial, so pushed
---
 src/qemu/qemu_conf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 8299b79..33fd67d 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1042,6 +1042,7 @@ qemuAddSharedDisk(virQEMUDriverPtr driver,
         if ((VIR_ALLOC(entry) < 0) ||
             (VIR_ALLOC_N(entry->domains, 1) < 0) ||
             !(entry->domains[0] = strdup(name))) {
+            qemuSharedDiskEntryFree(entry, NULL);
             virReportOOMError();
             goto cleanup;
         }
-- 
1.7.7.6

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