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

[libvirt] Segfault fixed



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;


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