fs/bfs: Fix memory leak in read_bfs_file()

The l1_entries and l2_entries were not freed at the end of file read.

Fixes: 5825b3794 (BFS implementation based on the specification)

Signed-off-by: t.feng <fengtao40@huawei.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
t.feng 2022-11-29 17:14:11 +08:00 committed by Daniel Kiper
parent a2f7914c3c
commit 6cdd08b362

View File

@ -416,6 +416,8 @@ read_bfs_file (grub_disk_t disk,
len -= read_size;
buf = (char *) buf + read_size;
}
grub_free (l1_entries);
grub_free (l2_entries);
return GRUB_ERR_NONE;
}
}