aboutsummaryrefslogtreecommitdiffstats
path: root/Library/UefiShellUfmCommandLib/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'Library/UefiShellUfmCommandLib/dir.c')
-rw-r--r--Library/UefiShellUfmCommandLib/dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/UefiShellUfmCommandLib/dir.c b/Library/UefiShellUfmCommandLib/dir.c
index 6049d18..9160f9f 100644
--- a/Library/UefiShellUfmCommandLib/dir.c
+++ b/Library/UefiShellUfmCommandLib/dir.c
@@ -52,6 +52,11 @@ struct dir_list *dirl_alloc(CHAR16 *search_path, CONST UINT64 attr)
dl->list_head = list_head;
dl->len = length;
+ dl->marked = AllocateZeroPool(length * sizeof(BOOLEAN));
+ if(!dl->marked) {
+ dirl_release(dl);
+ return NULL;
+ }
return dl;
}
@@ -59,6 +64,8 @@ VOID dirl_release(struct dir_list *dl)
{
if(dl->list_head)
ShellCloseFileMetaArg(&dl->list_head);
+ if(dl->marked)
+ FreePool(dl->marked);
FreePool(dl);
}