mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
library: fix segfault in overlaydirat_for_each
(cherry picked from commit abbca9435f
)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Tyler Hicks <tyler.hicks@canonical.com>
This commit is contained in:
@@ -401,7 +401,7 @@ int _aa_overlaydirat_for_each(int dirfd[], int n, void *data,
|
||||
}
|
||||
if (merge(overlay, size, max_size, list, n_list, dirfd[i])) {
|
||||
for (k = 0; k < n_list; k++)
|
||||
free(list[i]);
|
||||
free(list[k]);
|
||||
for (k = 0; k < size; k++)
|
||||
free(overlay[k].dent);
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user