2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

parser: fix definitely and possibly lost memory leaks

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia
2023-03-16 18:03:57 -03:00
parent bba1a023bf
commit 3c033606e4
3 changed files with 6 additions and 3 deletions

View File

@@ -1155,7 +1155,7 @@ int process_profile(int option, aa_kernel_interface *kernel_interface,
retval = process_binary(option, kernel_interface,
cachename);
if (!retval || skip_bad_cache_rebuild)
return retval;
goto out;
}
}
@@ -1218,7 +1218,8 @@ int process_profile(int option, aa_kernel_interface *kernel_interface,
}
}
out:
/* cleanup */
reset_parser(profilename);
return retval;
}
@@ -1705,6 +1706,7 @@ int main(int argc, char *argv[])
if (ofile)
fclose(ofile);
aa_policy_cache_unref(policy_cache);
aa_kernel_interface_unref(kernel_interface);
return last_error;
}