提交 0e9fadd6 编写于 作者: P Peter Krempa

qemu: monitor: Sanitize control flow in qemuMonitorSetCapabilities

上级 119aa5d3
......@@ -1527,7 +1527,6 @@ qemuMonitorEmitSerialChange(qemuMonitorPtr mon,
int
qemuMonitorSetCapabilities(qemuMonitorPtr mon)
{
int ret;
VIR_DEBUG("mon=%p", mon);
if (!mon) {
......@@ -1536,16 +1535,10 @@ qemuMonitorSetCapabilities(qemuMonitorPtr mon)
return -1;
}
if (mon->json) {
ret = qemuMonitorJSONSetCapabilities(mon);
if (ret < 0)
goto cleanup;
} else {
ret = 0;
}
if (!mon->json)
return 0;
cleanup:
return ret;
return qemuMonitorJSONSetCapabilities(mon);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册