tools: virt-host-validate: fix memory leak

virHostValidateGetCPUFlags returns an allocated virBitmap and
it needs to be freed.

Fixes: a0ec7165e3
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Kristína Hanicová <khanicov@redhat.com>
This commit is contained in:
Ján Tomko 2021-11-23 14:15:45 +01:00
parent edd1fd8ca9
commit 097d3a4f56
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@
int virHostValidateCh(void)
{
int ret = 0;
virBitmap *flags;
g_autoptr(virBitmap) flags = NULL;
bool hasHwVirt = false;
bool hasVirtFlag = false;
virArch arch = virArchFromHost();