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 authored and Daniel Kiper committed 2022-12-07 23:38:26 +01:00
1 parent a2f7914c3c
commit 6cdd08b362
1 file changed
+2
+2
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;
}
}