Commit 5fd1b95f authored by John Johansen's avatar John Johansen

apparmor: update policy_destroy to use new debug asserts

Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent d102d895
...@@ -197,15 +197,8 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix, ...@@ -197,15 +197,8 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix,
*/ */
void aa_policy_destroy(struct aa_policy *policy) void aa_policy_destroy(struct aa_policy *policy)
{ {
/* still contains profiles -- invalid */ AA_BUG(on_list_rcu(&policy->profiles));
if (on_list_rcu(&policy->profiles)) { AA_BUG(on_list_rcu(&policy->list));
AA_ERROR("%s: internal error, policy '%s' contains profiles\n",
__func__, policy->name);
}
if (on_list_rcu(&policy->list)) {
AA_ERROR("%s: internal error, policy '%s' still on list\n",
__func__, policy->name);
}
/* don't free name as its a subset of hname */ /* don't free name as its a subset of hname */
kzfree(policy->hname); kzfree(policy->hname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment