2
0
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:
Tyler Hicks
2013-09-11 11:57:38 -07:00
parent 46ae49a305
commit eb0d2d9851

View File

@@ -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;