aboutsummaryrefslogtreecommitdiffstats
path: root/Library/UefiShellUfmCommandLib
diff options
context:
space:
mode:
Diffstat (limited to 'Library/UefiShellUfmCommandLib')
-rw-r--r--Library/UefiShellUfmCommandLib/dir.c7
-rw-r--r--Library/UefiShellUfmCommandLib/dir.h1
2 files changed, 8 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);
}
diff --git a/Library/UefiShellUfmCommandLib/dir.h b/Library/UefiShellUfmCommandLib/dir.h
index 912b00f..34b257d 100644
--- a/Library/UefiShellUfmCommandLib/dir.h
+++ b/Library/UefiShellUfmCommandLib/dir.h
@@ -5,6 +5,7 @@
struct dir_list {
EFI_SHELL_FILE_INFO *list_head;
+ BOOLEAN *marked; // files are marked on a panel
int len; // number of elements in list
};