mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 05:47:59 +00:00
fix failure paths around policy that can result in a crash
Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
parent
6eeaabb33c
commit
c9ed990016
@ -712,6 +712,9 @@ int process_profile_policydb(Profile *prof)
|
||||
prof->policy.rules = NULL;
|
||||
if (!prof->policy.dfa)
|
||||
goto out;
|
||||
} else {
|
||||
aare_delete_ruleset(prof->policy.rules);
|
||||
prof->policy.rules = NULL;
|
||||
}
|
||||
|
||||
aare_reset_matchflags();
|
||||
@ -719,6 +722,9 @@ int process_profile_policydb(Profile *prof)
|
||||
error = 0;
|
||||
|
||||
out:
|
||||
aare_delete_ruleset(prof->policy.rules);
|
||||
prof->policy.rules = NULL;
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user