mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: Use g_autoptr(qemuMonitorCPUModelInfo)
There are two instances of an explicit call to qemuMonitorCPUModelInfoFree() which in fact can be turned into g_auto(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
parent
7c2a4e84b7
commit
e97be65e65
@ -12396,7 +12396,7 @@ static int
|
||||
qemuConnectStealCPUModelFromInfo(virCPUDef *dst,
|
||||
qemuMonitorCPUModelInfo **src)
|
||||
{
|
||||
qemuMonitorCPUModelInfo *info;
|
||||
g_autoptr(qemuMonitorCPUModelInfo) info = NULL;
|
||||
size_t i;
|
||||
int ret = -1;
|
||||
|
||||
@ -12419,7 +12419,6 @@ qemuConnectStealCPUModelFromInfo(virCPUDef *dst,
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
qemuMonitorCPUModelInfoFree(info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2838,7 +2838,7 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelBaseline(const void *opaque)
|
||||
g_autoptr(qemuMonitorTest) test = NULL;
|
||||
g_autoptr(virCPUDef) cpu_a = virCPUDefNew();
|
||||
g_autoptr(virCPUDef) cpu_b = virCPUDefNew();
|
||||
qemuMonitorCPUModelInfo *baseline = NULL;
|
||||
g_autoptr(qemuMonitorCPUModelInfo) baseline = NULL;
|
||||
int ret = -1;
|
||||
|
||||
if (!(test = qemuMonitorTestNewSchema(data->xmlopt, data->schema)))
|
||||
@ -2897,7 +2897,6 @@ testQemuMonitorJSONqemuMonitorJSONGetCPUModelBaseline(const void *opaque)
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
qemuMonitorCPUModelInfoFree(baseline);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user