diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/apparmorfs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index 949dd8a48164..e09fe4d7307c 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c | |||
@@ -603,7 +603,7 @@ static const struct file_operations aa_fs_ns_revision_fops = { | |||
603 | static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, | 603 | static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, |
604 | const char *match_str, size_t match_len) | 604 | const char *match_str, size_t match_len) |
605 | { | 605 | { |
606 | struct aa_perms tmp; | 606 | struct aa_perms tmp = { }; |
607 | struct aa_dfa *dfa; | 607 | struct aa_dfa *dfa; |
608 | unsigned int state = 0; | 608 | unsigned int state = 0; |
609 | 609 | ||
@@ -613,7 +613,6 @@ static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, | |||
613 | dfa = profile->file.dfa; | 613 | dfa = profile->file.dfa; |
614 | state = aa_dfa_match_len(dfa, profile->file.start, | 614 | state = aa_dfa_match_len(dfa, profile->file.start, |
615 | match_str + 1, match_len - 1); | 615 | match_str + 1, match_len - 1); |
616 | tmp = nullperms; | ||
617 | if (state) { | 616 | if (state) { |
618 | struct path_cond cond = { }; | 617 | struct path_cond cond = { }; |
619 | 618 | ||
@@ -627,8 +626,6 @@ static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, | |||
627 | match_str, match_len); | 626 | match_str, match_len); |
628 | if (state) | 627 | if (state) |
629 | aa_compute_perms(dfa, state, &tmp); | 628 | aa_compute_perms(dfa, state, &tmp); |
630 | else | ||
631 | tmp = nullperms; | ||
632 | } | 629 | } |
633 | aa_apply_modes_to_perms(profile, &tmp); | 630 | aa_apply_modes_to_perms(profile, &tmp); |
634 | aa_perms_accum_raw(perms, &tmp); | 631 | aa_perms_accum_raw(perms, &tmp); |