Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/util/virhostcpu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 83e3a5d0f1..54e2462a95 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -582,8 +582,8 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, unsigned int *cores, unsigned int *threads) { - virBitmap *present_cpus_map = NULL; - virBitmap *online_cpus_map = NULL; + g_autoptr(virBitmap) present_cpus_map = NULL; + g_autoptr(virBitmap) online_cpus_map = NULL; g_autoptr(DIR) nodedir = NULL; struct dirent *nodedirent = NULL; int nodecpus, nodecores, nodesockets, nodethreads, offline = 0; @@ -745,8 +745,6 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, ret = 0; cleanup: - virBitmapFree(present_cpus_map); - virBitmapFree(online_cpus_map); VIR_FREE(sysfs_nodedir); VIR_FREE(sysfs_cpudir); return ret; -- 2.31.1