From: Eric Blake Date: Mon, 13 May 2013 22:48:55 +0000 (-0600) Subject: qemu: fix bad free X-Git-Tag: CVE-2013-1962~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b923ba3c81c106e78f1f2e553f040784fe841cc;p=thirdparty%2Flibvirt.git qemu: fix bad free Commit bd56d0d8 could lead to freeing an uninitialized pointer: qemu/qemu_monitor_json.c: In function 'qemuMonitorJSONGetCommandLineOptionParameters': qemu/qemu_monitor_json.c:4284: warning: 'cmd' may be used uninitialized in this function * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetCommandLineOptionParameters): Initialize variable. Signed-off-by: Eric Blake --- diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 0c011d31b0..d95198bc1f 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4281,7 +4281,7 @@ qemuMonitorJSONGetCommandLineOptionParameters(qemuMonitorPtr mon, char ***params) { int ret; - virJSONValuePtr cmd; + virJSONValuePtr cmd = NULL; virJSONValuePtr reply = NULL; virJSONValuePtr data = NULL; virJSONValuePtr array = NULL;