diff --git a/samples/landlock/sandboxer.c b/samples/landlock/sandboxer.c index 7a15910d21718d87d0076ab1f41e523a14856b54..8859fc1935428ed902dda098f0cdd9e5d337507a 100644 --- a/samples/landlock/sandboxer.c +++ b/samples/landlock/sandboxer.c @@ -134,6 +134,7 @@ static int populate_ruleset( ret = 0; out_free_name: + free(path_list); free(env_path_name); return ret; } diff --git a/security/landlock/syscalls.c b/security/landlock/syscalls.c index 32396962f04d6394616acef1f27cd73097836f0d..7e27ce394020de5cb2ef9854a88616e9b80ed999 100644 --- a/security/landlock/syscalls.c +++ b/security/landlock/syscalls.c @@ -192,7 +192,7 @@ SYSCALL_DEFINE3(landlock_create_ruleset, return PTR_ERR(ruleset); /* Creates anonymous FD referring to the ruleset. */ - ruleset_fd = anon_inode_getfd("landlock-ruleset", &ruleset_fops, + ruleset_fd = anon_inode_getfd("[landlock-ruleset]", &ruleset_fops, ruleset, O_RDWR | O_CLOEXEC); if (ruleset_fd < 0) landlock_put_ruleset(ruleset);