[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240904025559.7356-1-zhangjiao2@cmss.chinamobile.com>
Date: Wed, 4 Sep 2024 10:55:59 +0800
From: zhangjiao2 <zhangjiao2@...s.chinamobile.com>
To: tglx@...utronix.de
Cc: mingo@...hat.com,
shuah@...nel.org,
linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
zhang jiao <zhangjiao2@...s.chinamobile.com>
Subject: [PATCH] selftests: futex: Fix missing free in main
From: zhang jiao <zhangjiao2@...s.chinamobile.com>
Free string allocated by asprintf().
Signed-off-by: zhang jiao <zhangjiao2@...s.chinamobile.com>
---
tools/testing/selftests/futex/functional/futex_requeue_pi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi.c b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
index 215c6cb539b4..fb2dab46087f 100644
--- a/tools/testing/selftests/futex/functional/futex_requeue_pi.c
+++ b/tools/testing/selftests/futex/functional/futex_requeue_pi.c
@@ -416,5 +416,8 @@ int main(int argc, char *argv[])
ret = unit_test(broadcast, locked, owner, timeout_ns);
print_result(test_name, ret);
+ if (strlen(test_name) > strlen(TEST_NAME))
+ free(test_name);
+
return ret;
}
--
2.33.0
Powered by blists - more mailing lists