mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 01:57:43 +00:00
parser: free leaking cod_entry in case of failure in do_alias
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
parent
3faddfcf46
commit
8b2e2c3358
@ -133,8 +133,10 @@ static void process_entries(const void *nodep, VISIT value, int level unused)
|
||||
if (entry->link_name &&
|
||||
strncmp((*t)->from, entry->link_name, len) == 0) {
|
||||
char *n = do_alias(*t, entry->link_name);
|
||||
if (!n)
|
||||
if (!n) {
|
||||
free_cod_entries(dup);
|
||||
return;
|
||||
}
|
||||
if (!dup)
|
||||
dup = copy_cod_entry(entry);
|
||||
free(dup->link_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user