diff --git a/src/firejail/landlock.c b/src/firejail/landlock.c index bb8b1d364e1..ce222624b54 100644 --- a/src/firejail/landlock.c +++ b/src/firejail/landlock.c @@ -83,7 +83,7 @@ static int ll_is_supported(void) { } static int ll_create_full_ruleset(void) { - struct landlock_ruleset_attr attr; + struct landlock_ruleset_attr attr = {0}; attr.handled_access_fs = LANDLOCK_ACCESS_FS_EXECUTE | LANDLOCK_ACCESS_FS_MAKE_BLOCK | @@ -133,7 +133,7 @@ static void _ll_fs(const char *allowed_path, const __u64 allowed_access, return; } - struct landlock_path_beneath_attr target; + struct landlock_path_beneath_attr target = {0}; target.parent_fd = allowed_fd; target.allowed_access = allowed_access; int error = landlock_add_rule(ll_ruleset_fd, LANDLOCK_RULE_PATH_BENEATH,