[libvirt] [PATCH] qemu: Fix the memory leak
Osier Yang
jyang at redhat.com
Thu Feb 21 02:43:08 UTC 2013
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
More information about the libvir-list
mailing list