From 484a0bab39f62d95f1155bff32f78e61e92cc4cb Mon Sep 17 00:00:00 2001 From: Hendrik Schwartke Date: Mon, 30 Jan 2012 13:36:46 +0100 Subject: [PATCH] qemu: Fix segfault in qemuMonitorTextGetBlockInfo If some error occurs then the cleanup code calls VIR_FREE(info) without ensuring that info is initialized. --- AUTHORS | 1 + src/qemu/qemu_monitor_text.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 166b76fc6b..d995ac21f5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -219,6 +219,7 @@ Patches have also been contributed by: Laszlo Ersek Zeeshan Ali (Khattak) Marcelo Cerri + Hendrik Schwartke [....send patches to get your name here....] diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index a33d192c2d..edeb435612 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;