提交 4c53267b 编写于 作者: M Michal Privoznik

qemu_monitor_text: Drop unused variable and avoid crash

In v5.8.0-rc1~122 we've removed the only use of @safename in
qemuMonitorTextLoadSnapshot(). What we are left with is an
declared but not initialized variable that is passed to
VIR_FREE().

Caught by libvirt-php test suite.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 4d0a4b39
......@@ -161,7 +161,6 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name)
char *cmd = NULL;
char *reply = NULL;
int ret = -1;
char *safename;
cmd = g_strdup_printf("loadvm \"%s\"", name);
......@@ -194,7 +193,6 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name)
ret = 0;
cleanup:
VIR_FREE(safename);
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册