mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: Use g_autoptr in qemuMonitorJSONGetCPUDefinitions
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7e3e31444c
commit
fb35cbb329
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user