Skip to content

Commit

Permalink
apparmor: update policy_destroy to use new debug asserts
Browse files Browse the repository at this point in the history
Signed-off-by: John Johansen <john.johansen@canonical.com>
  • Loading branch information
John Johansen committed Jan 16, 2017
1 parent d102d89 commit 5fd1b95
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions security/apparmor/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,8 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix,
*/
void aa_policy_destroy(struct aa_policy *policy)
{
/* still contains profiles -- invalid */
if (on_list_rcu(&policy->profiles)) {
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);
}
AA_BUG(on_list_rcu(&policy->profiles));
AA_BUG(on_list_rcu(&policy->list));

/* don't free name as its a subset of hname */
kzfree(policy->hname);
Expand Down

0 comments on commit 5fd1b95

Please sign in to comment.