[PATCH 30/36] libxl_driver: Use automatic memory freeing for virBitmap

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/libxl/libxl_driver.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 0b14b5093e..ef31f2cdcf 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2416,7 +2416,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
     libxlDriverPrivate *driver = dom->conn->privateData;
     libxlDriverConfig *cfg = libxlDriverConfigGet(driver);
     virDomainDef *targetDef = NULL;
-    virBitmap *pcpumap = NULL;
+    g_autoptr(virBitmap) pcpumap = NULL;
     virDomainVcpuDef *vcpuinfo;
     virDomainObj *vm;
     int ret = -1;
@@ -2477,7 +2477,6 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,

  cleanup:
     virDomainObjEndAPI(&vm);
-    virBitmapFree(pcpumap);
     virObjectUnref(cfg);
     return ret;
 }
@@ -4808,7 +4807,7 @@ libxlDomainGetNumaParameters(virDomainPtr dom,
     libxlDriverConfig *cfg = libxlDriverConfigGet(driver);
     virDomainObj *vm;
     libxl_bitmap nodemap;
-    virBitmap *nodes = NULL;
+    g_autoptr(virBitmap) nodes = NULL;
     int rc, ret = -1;
     size_t i, j;

@@ -4907,7 +4906,6 @@ libxlDomainGetNumaParameters(virDomainPtr dom,
     ret = 0;

  cleanup:
-    virBitmapFree(nodes);
     libxl_bitmap_dispose(&nodemap);
     virDomainObjEndAPI(&vm);
     virObjectUnref(cfg);
-- 
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