mirror of
https://gitlab.com/qemu-project/edk2.git
synced 2025-10-30 07:56:39 +08:00
Since the FileFcb’s list entry is not initialized at allocation, SemihostFs reports the following crash when freeing FileFcb after failing to obtain the file size in FileOpen(): ASSERT [SemihostFs] LinkedList.c(75): List->ForwardLink != ((void *) 0) To fix this, properly initialize the list entry at FCB allocation and move RemoveListEntry() to FileClose(), since the FCB entry will only be on the list when VolumeOpen() or FileOpen() succeeds. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>