aboutsummaryrefslogtreecommitdiff
path: root/Application
diff options
context:
space:
mode:
authorMatthijs Lavrijsen <mattiwatti@gmail.com>2024-01-21 06:07:36 +0100
committerMatthijs Lavrijsen <mattiwatti@gmail.com>2024-01-21 06:07:36 +0100
commita1c33c4ae6213de5ed390cb16253fdf06bf93715 (patch)
treec6f5eab887fc9f6c4782e684ce5611920ba09453 /Application
parent4dc84bdb64b712e4f9d0d8c6899a16486d3dcfc3 (diff)
Loader: close root volume handle in LocateFile()
Diffstat (limited to 'Application')
-rw-r--r--Application/Loader/Loader.c4
1 files changed, 3 insertions, 1 deletions
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);