From ece7e227aeda655297f374f78834574badeb54c5 Mon Sep 17 00:00:00 2001 From: Pingfan Liu Date: Wed, 17 Apr 2024 10:53:56 +0800 Subject: [PATCH 4/8] numactl: Fix RESOURCE_LEAK in show() Although exit() is called immediately after show(), it is better to keep the malloc/free pair practice. Signed-off-by: Pingfan Liu --- numactl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/numactl.c b/numactl.c index 16a90a0..37949de 100755 --- a/numactl.c +++ b/numactl.c @@ -196,6 +196,7 @@ static void show(void) printmask("nodebind", cpubind); printmask("membind", membind); printmask("preferred", preferred); + numa_bitmask_free(preferred); } static char *fmt_mem(unsigned long long mem, char *buf) -- 2.41.0