Skip to content

Commit

Permalink
numademo: free the node_to_use on the way out
Browse files Browse the repository at this point in the history
Frees pointer node_to_use before exiting program.

Fixes the following valgrind warnings:

  4 bytes in 1 blocks are still reachable in loss record 1 of 1
     at 0x4C28BE3: malloc (vg_replace_malloc.c:299)
     by 0x402973: get_node_list (in /home/sansharm/src/numactl/.libs/numademo)
     by 0x401450: main (in /home/sansharm/src/numactl/.libs/numademo)

Signed-off-by: Sanskriti Sharma <sansharm@redhat.com>
  • Loading branch information
Sanskriti Sharma authored and andikleen committed Oct 15, 2018
1 parent a7ec807 commit f567a26
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions numademo.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,5 +575,6 @@ int main(int ac, char **av)
}
}
}
free(node_to_use);
return 0;
}

0 comments on commit f567a26

Please sign in to comment.