2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

Fix to stop leaking the dfa ruleset. On large policies containing lots of

hats this will result in a marked improvement on memory usage.
This commit is contained in:
John Johansen
2008-06-08 08:56:37 +00:00
parent aa0b2030c7
commit b2f4863231
2 changed files with 7 additions and 5 deletions

View File

@@ -602,7 +602,9 @@ int process_regex(struct codomain *cod)
if (regex_type == AARE_DFA && cod->dfarule_count > 0) {
cod->dfa = aare_create_dfa(cod->dfarules, 0, &cod->dfa_size);
if (!cod->dfa)
aare_delete_ruleset(cod->dfarules);
cod->dfarules = NULL;
if (!cod->dfa)
goto out;
/*
if (cod->dfa_size == 0) {