From a1c33c4ae6213de5ed390cb16253fdf06bf93715 Mon Sep 17 00:00:00 2001 From: Matthijs Lavrijsen Date: Sun, 21 Jan 2024 06:07:36 +0100 Subject: Loader: close root volume handle in LocateFile() --- Application/Loader/Loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Application') diff --git a/Application/Loader/Loader.c b/Application/Loader/Loader.c index 8f1132e..9d40b3c 100644 --- a/Application/Loader/Loader.c +++ b/Application/Loader/Loader.c @@ -195,7 +195,8 @@ LocateFile( EFI_FILE_READ_ONLY); if (!EFI_ERROR(Status)) { - VolumeHandle->Close(FileHandle); + FileHandle->Close(FileHandle); + VolumeHandle->Close(VolumeHandle); *DevicePath = FileDevicePath(Handles[i], ImagePath); CHAR16 *PathString = ConvertDevicePathToText(*DevicePath, TRUE, TRUE); DEBUG((DEBUG_INFO, "[LOADER] Found file at %S.\r\n", PathString)); @@ -203,6 +204,7 @@ LocateFile( FreePool(PathString); break; } + VolumeHandle->Close(VolumeHandle); } FreePool(Handles); -- cgit v1.2.3