2
0
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:
John Johansen
2019-03-12 16:17:35 -07:00
parent a75ae4497c
commit 5704fba8d9

View File

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