Segfault fixed

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

 



Hi,

there is a segfault in qemu_monitor_text.c. If some error accurs in qemuMonitorTextGetBlockInfo then the cleanup code calls VIR_FREE(info) without ensuring that info is initialized.

Patch based on c6ec021b3c19c3ecc97d60d35b12eaa0b94da701:

diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index a33d192..fb3309b 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -774,7 +774,7 @@ int qemuMonitorTextGetMemoryStats(qemuMonitorPtr mon,
 int qemuMonitorTextGetBlockInfo(qemuMonitorPtr mon,
                                 virHashTablePtr table)
 {
-    struct qemuDomainDiskInfo *info;
+    struct qemuDomainDiskInfo *info=NULL;
     char *reply = NULL;
     int ret = -1;
     char *dummy;

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