mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +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:
parent
42bf2a7573
commit
de6a40f01f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user