提交 0b923ba3 编写于 作者: E Eric Blake

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: NEric Blake <eblake@redhat.com>
上级 bf87b99d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册