提交 fb35cbb3 编写于 作者: J Jiri Denemark

qemu: Use g_autoptr in qemuMonitorJSONGetCPUDefinitions

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 7e3e3144
......@@ -5574,8 +5574,8 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
qemuMonitorCPUDefInfoPtr **cpus)
{
int ret = -1;
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
g_autoptr(virJSONValue) cmd = NULL;
g_autoptr(virJSONValue) reply = NULL;
virJSONValuePtr data;
qemuMonitorCPUDefInfoPtr *cpulist = NULL;
size_t n = 0;
......@@ -5675,8 +5675,6 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
qemuMonitorCPUDefInfoFree(cpulist[i]);
VIR_FREE(cpulist);
}
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册