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

[Xen-devel] [PATCH v1] xl: free bitmaps on exit



Every invocation of xl via valgrind will show three leaks. Since
libxl_bitmap_alloc uses NOGC, the caller has to free the memory after
use.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 tools/xl/xl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/xl/xl.c b/tools/xl/xl.c
index 7d2142f16f..9756a83526 100644
--- a/tools/xl/xl.c
+++ b/tools/xl/xl.c
@@ -229,6 +229,9 @@ static void parse_global_config(const char *configfile,
     else
         libxl_bitmap_set_any(&global_pv_affinity_mask);
 
+    libxl_bitmap_dispose(&global_pv_affinity_mask);
+    libxl_bitmap_dispose(&global_hvm_affinity_mask);
+    libxl_bitmap_dispose(&global_vm_affinity_mask);
     xlu_cfg_destroy(config);
 }
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.