[apparmor] [patch 03/26] fix failure paths around policy that can result in a crash
john.johansen at canonical.com
john.johansen at canonical.com
Tue Apr 15 17:22:10 UTC 2014
Signed-off-by: John Johansen <john.johansen at canonical.com>
Acked-by: Steve Beattie <steve at nxnw.org>
---
parser/parser_regex.c | 6 ++++++
1 file changed, 6 insertions(+)
--- 2.9-test.orig/parser/parser_regex.c
+++ 2.9-test/parser/parser_regex.c
@@ -712,6 +712,9 @@
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 @@
error = 0;
out:
+ aare_delete_ruleset(prof->policy.rules);
+ prof->policy.rules = NULL;
+
return error;
}
More information about the AppArmor
mailing list