From 097d3a4f5609f59de1b04cb331102b2456bf5a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 23 Nov 2021 14:15:45 +0100 Subject: [PATCH] tools: virt-host-validate: fix memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit virHostValidateGetCPUFlags returns an allocated virBitmap and it needs to be freed. Fixes: a0ec7165e3bbc416478740f6d2e8fef2ece18602 Signed-off-by: Ján Tomko Reviewed-by: Kristína Hanicová --- tools/virt-host-validate-ch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virt-host-validate-ch.c b/tools/virt-host-validate-ch.c index b00fdd0e90..b26f82738d 100644 --- a/tools/virt-host-validate-ch.c +++ b/tools/virt-host-validate-ch.c @@ -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();