From 2864fdd790b70418b560295ae87704f1b9eb1b9f Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Fri, 5 Jan 2024 23:24:13 +0100 Subject: [PATCH] Close directory after reading module file --- xtldr/protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xtldr/protocol.c b/xtldr/protocol.c index 98ededc..477aa20 100644 --- a/xtldr/protocol.c +++ b/xtldr/protocol.c @@ -145,8 +145,9 @@ BlLoadModule(IN PWCHAR ModuleName) return Status; } - /* Read module file from disk and close EFI volume */ + /* Read module file from disk and close directory and EFI volume */ Status = BlReadFile(DirHandle, ModuleFileName, &ModuleData, &ModuleSize); + DirHandle->Close(DirHandle); BlCloseVolume(DiskHandle); /* Make sure module file was read successfully */