mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: make sure xattr cond_entry_list is not leaked
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -997,11 +997,21 @@ void free_cond_list(struct cond_entry *ents)
|
||||
{
|
||||
struct cond_entry *entry, *tmp;
|
||||
|
||||
list_for_each_safe(ents, entry, tmp) {
|
||||
free_cond_entry(entry);
|
||||
if (ents) {
|
||||
list_for_each_safe(ents, entry, tmp) {
|
||||
free_cond_entry(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void free_cond_entry_list(struct cond_entry_list &cond)
|
||||
{
|
||||
free_cond_list(cond.list);
|
||||
free(cond.name);
|
||||
cond.list = NULL;
|
||||
cond.name = NULL;
|
||||
}
|
||||
|
||||
void print_cond_entry(struct cond_entry *ent)
|
||||
{
|
||||
if (ent) {
|
||||
|
Reference in New Issue
Block a user