mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: Use free_cod_entries() when merging file entries
Reuse free_cod_entries() when freeing merged file entries in process_file_entries(). Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
@@ -118,10 +118,8 @@ static int process_file_entries(struct codomain *cod)
|
||||
//fprintf(stderr, "warning: merging rule 0x%x %s\n", next->audit, next->name);
|
||||
cur->mode |= next->mode;
|
||||
cur->audit |= next->audit;
|
||||
free(next->name);
|
||||
if (next->link_name)
|
||||
free(next->link_name);
|
||||
free(next);
|
||||
next->next = NULL;
|
||||
free_cod_entries(next);
|
||||
table[n] = NULL;
|
||||
} else {
|
||||
cur = next;
|
||||
|
Reference in New Issue
Block a user