1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-10 05:17:59 +03:00

virhostcpu.c: use g_autoptr in virHostCPUGetMap()

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Daniel Henrique Barboza 2020-06-26 19:10:39 -03:00 committed by Michal Privoznik
parent 42bf2a7573
commit de6a40f01f

View File

@ -1089,7 +1089,7 @@ virHostCPUGetMap(unsigned char **cpumap,
unsigned int *online,
unsigned int flags)
{
virBitmapPtr cpus = NULL;
g_autoptr(virBitmap) cpus = NULL;
int ret = -1;
int dummy;
@ -1111,7 +1111,6 @@ virHostCPUGetMap(unsigned char **cpumap,
cleanup:
if (ret < 0 && cpumap)
VIR_FREE(*cpumap);
virBitmapFree(cpus);
return ret;
}