summaryrefslogtreecommitdiff
path: root/security/apparmor/policy.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2020-11-19 10:37:48 -0800
committerJohn Johansen <john.johansen@canonical.com>2022-10-03 14:49:03 -0700
commit53bdc46f4bdd20d477afb374767cabe627fd04ae (patch)
treeb251f2dc7ddc5fef5e65d6f0b6ba1b963af0283b /security/apparmor/policy.c
parente2967ede22978f132cd52929edff96c701bde0eb (diff)
apparmor: combine file_rules and aa_policydb into a single shared struct
file_rules and policydb are almost the same and will need the same features in the future so combine them. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/policy.c')
-rw-r--r--security/apparmor/policy.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index 6c3086e2c820..0814ee57a06b 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -219,7 +219,7 @@ void aa_free_profile(struct aa_profile *profile)
aa_put_ns(profile->ns);
kfree_sensitive(profile->rename);
- aa_free_file_rules(&profile->file);
+ aa_destroy_policydb(&profile->file);
aa_free_cap_rules(&profile->caps);
aa_free_rlimit_rules(&profile->rlimits);
@@ -232,8 +232,7 @@ void aa_free_profile(struct aa_profile *profile)
kfree_sensitive(profile->dirname);
aa_put_dfa(profile->xmatch);
kvfree(profile->xmatch_perms);
- aa_put_dfa(profile->policy.dfa);
- kvfree(profile->policy.perms);
+ aa_destroy_policydb(&profile->policy);
if (profile->data) {
rht = profile->data;
profile->data = NULL;