Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libnuma: cleanup node cpu mask in destructor
Free node_cpu_mask_v2[] bitmap-pointer-array and all of the bitmaps that it points to. Fixes the following valgrind warnings: 16 bytes in 1 blocks are still reachable in loss record 1 of 3 at 0x4C28BE3: malloc (vg_replace_malloc.c:299) by 0x4E37E05: numa_bitmask_alloc (libnuma.c:210) by 0x4E3998E: numa_node_to_cpus@@libnuma_1.2 (libnuma.c:1381) by 0x4E3A3C9: numa_run_on_node (libnuma.c:1718) by 0x402DB5: test (in /home/sansharm/src/numactl/.libs/numademo) by 0x401672: main (in /home/sansharm/src/numactl/.libs/numademo) 512 bytes in 1 blocks are still reachable in loss record 2 of 3 at 0x4C2A975: calloc (vg_replace_malloc.c:711) by 0x4E37E24: numa_bitmask_alloc (libnuma.c:214) by 0x4E3998E: numa_node_to_cpus@@libnuma_1.2 (libnuma.c:1381) by 0x4E3A3C9: numa_run_on_node (libnuma.c:1718) by 0x402DB5: test (in /home/sansharm/src/numactl/.libs/numademo) by 0x401672: main (in /home/sansharm/src/numactl/.libs/numademo) 8,192 bytes in 1 blocks are still reachable in loss record 3 of 3 at 0x4C2A975: calloc (vg_replace_malloc.c:711) by 0x4E39974: init_node_cpu_mask_v2 (libnuma.c:1266) by 0x4E39974: numa_node_to_cpus@@libnuma_1.2 (libnuma.c:1361) by 0x4E3A3C9: numa_run_on_node (libnuma.c:1718) by 0x402DB5: test (in /home/sansharm/src/numactl/.libs/numademo) by 0x401672: main (in /home/sansharm/src/numactl/.libs/numademo) Signed-off-by:Sanskriti Sharma <sansharm@redhat.com>
- Loading branch information