mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
util: hostcpu: convert pointers to use g_autofree
Signed-off-by: Barrett Schonefeld <bschoney@utexas.edu> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a93413c4d5
commit
e943f7ddee
@ -87,7 +87,7 @@ virHostCPUGetStatsFreeBSD(int cpuNum,
|
||||
int *nparams)
|
||||
{
|
||||
const char *sysctl_name;
|
||||
long *cpu_times;
|
||||
g_autofree long *cpu_times = NULL;
|
||||
struct clockinfo clkinfo;
|
||||
size_t i, j, cpu_times_size, clkinfo_size;
|
||||
int cpu_times_num, offset, hz, stathz, ret = -1;
|
||||
@ -172,8 +172,6 @@ virHostCPUGetStatsFreeBSD(int cpuNum,
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(cpu_times);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user