summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-07-26 22:25:56 +0100
committerMark Brown <broonie@kernel.org>2026-07-26 22:25:56 +0100
commitd2adbb1dbdd717b582e48388c1cb8384796d3aed (patch)
treeb0f1d17afd67a8fd6e01ca428f51d612567a3c8c /tools/testing
parent3e55e7966d7521c46cc332809f449c5d20c129f4 (diff)
parent0cee720cfd51402cfcb14d96cb326a36c13b823a (diff)
downloadlinux-next-d2adbb1dbdd717b582e48388c1cb8384796d3aed.tar.gz
linux-next-d2adbb1dbdd717b582e48388c1cb8384796d3aed.zip
Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm.git
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/lsm/common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/lsm/common.c b/tools/testing/selftests/lsm/common.c
index 9ad258912646..927dce4f04cb 100644
--- a/tools/testing/selftests/lsm/common.c
+++ b/tools/testing/selftests/lsm/common.c
@@ -76,7 +76,7 @@ int attr_lsm_count(void)
return 0;
if (read_sysfs_lsms(names, sysconf(_SC_PAGESIZE)))
- return 0;
+ goto out;
if (strstr(names, "selinux"))
count++;
@@ -85,5 +85,7 @@ int attr_lsm_count(void)
if (strstr(names, "apparmor"))
count++;
+out:
+ free(names);
return count;
}