From: Barrett Schonefeld <bschoney(a)utexas.edu>
- src/util/virhostcpu.c
Signed-off-by: Barrett Schonefeld <bschoney(a)utexas.edu>
---
src/util/virhostcpu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index c531d65f86..4f6c3390ce 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -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;
}
--
2.29.0