This commit doesn't aim to extinguish every VIR_FREE() call, but
only those which were touched by the previous commit. The aim is
to drop cleanup/error labels.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
{
virDomainXMLOption *xmlopt = (virDomainXMLOption *)data;
g_autoptr(qemuMonitorTest) test = qemuMonitorTestNewAgent(xmlopt);
- qemuAgentCPUInfo *cpuinfo = NULL;
+ g_autofree qemuAgentCPUInfo *cpuinfo = NULL;
int nvcpus;
int ret = -1;
ret = 0;
cleanup:
- VIR_FREE(cpuinfo);
return ret;
}
int major;
int minor;
int micro;
- char *package = NULL;
+ g_autofree char *package = NULL;
g_autoptr(qemuMonitorTest) test = NULL;
if (!(test = qemuMonitorTestNewSchema(xmlopt, data->schema)))
ret = 0;
cleanup:
- VIR_FREE(package);
return ret;
}
virDomainChrSourceDef *src)
{
g_autoptr(qemuMonitorTest) test = NULL;
- char *path = NULL;
- char *tmpdir_template = NULL;
+ g_autofree char *path = NULL;
+ g_autofree char *tmpdir_template = NULL;
test = g_new0(qemuMonitorTest, 1);
return g_steal_pointer(&test);
error:
- VIR_FREE(path);
- VIR_FREE(tmpdir_template);
return NULL;
}