There's one place (specifically qemuMonitorJSONParseCPUModel())
where we can avoid explicit free call for qemuMonitorCPUModelInfo
struct.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
virJSONValue *cpu_props,
qemuMonitorCPUModelInfo **model_info)
{
- qemuMonitorCPUModelInfo *machine_model = NULL;
+ g_autoptr(qemuMonitorCPUModelInfo) machine_model = NULL;
int ret = -1;
machine_model = g_new0(qemuMonitorCPUModelInfo, 1);
ret = 0;
cleanup:
- qemuMonitorCPUModelInfoFree(machine_model);
return ret;
}