[libvirt] [PATCH] qemu: Don't allocate zero bytes

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

 



---
 src/qemu/qemu_conf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 38eb3fd..92a9348 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -836,7 +836,7 @@ qemudCapsInitGuest(virCapsPtr caps,
             return -1;
         }
 
-        if (VIR_ALLOC_N(machines, nmachines) < 0) {
+        if (VIR_ALLOC_N(machines, 1) < 0) {
             virReportOOMError(NULL);
             VIR_FREE(machine->name);
             VIR_FREE(machine);
-- 
1.6.3.3

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