[libvirt PATCH 1/4] tools: virt-host-validate: fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Fixes: a0ec7165e3bbc416478740f6d2e8fef2ece18602
Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 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();
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux