summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Ching-Pang Lin <glin@suse.com>2013-09-26 11:58:02 -0400
committerPeter Jones <pjones@redhat.com>2013-09-26 11:58:02 -0400
commit8371c49ce7d1ca42a693620deb99b036dc29eca3 (patch)
tree32027db3a06c5843cb1cb1cbe2918f904ab040bb
parentd71240bffff7a3813d75e14120ef800293e0214c (diff)
downloadefi-boot-shim-8371c49ce7d1ca42a693620deb99b036dc29eca3.tar.gz
efi-boot-shim-8371c49ce7d1ca42a693620deb99b036dc29eca3.zip
MokManager: Remove the unnecessary string duplication
-rw-r--r--MokManager.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/MokManager.c b/MokManager.c
index 4cf836fd..aacef619 100644
--- a/MokManager.c
+++ b/MokManager.c
@@ -1448,45 +1448,45 @@ static EFI_STATUS enter_mok_menu(EFI_HANDLE image_handle,
return EFI_OUT_OF_RESOURCES;
}
- menu_strings[i] = StrDuplicate(L"Continue boot");
+ menu_strings[i] = L"Continue boot";
menu_item[i] = MOK_CONTINUE_BOOT;
i++;
if (MokNew || MokAuth) {
if (!MokNew) {
- menu_strings[i] = StrDuplicate(L"Reset MOK");
+ menu_strings[i] = L"Reset MOK";
menu_item[i] = MOK_RESET_MOK;
} else {
- menu_strings[i] = StrDuplicate(L"Enroll MOK");
+ menu_strings[i] = L"Enroll MOK";
menu_item[i] = MOK_ENROLL_MOK;
}
i++;
}
if (MokDel || MokDelAuth) {
- menu_strings[i] = StrDuplicate(L"Delete MOK");
+ menu_strings[i] = L"Delete MOK";
menu_item[i] = MOK_DELETE_MOK;
i++;
}
if (MokSB) {
- menu_strings[i] = StrDuplicate(L"Change Secure Boot state");
+ menu_strings[i] = L"Change Secure Boot state";
menu_item[i] = MOK_CHANGE_SB;
i++;
}
if (MokPW) {
- menu_strings[i] = StrDuplicate(L"Set MOK password");
+ menu_strings[i] = L"Set MOK password";
menu_item[i] = MOK_SET_PW;
i++;
}
- menu_strings[i] = StrDuplicate(L"Enroll key from disk");
+ menu_strings[i] = L"Enroll key from disk";
menu_item[i] = MOK_KEY_ENROLL;
i++;
- menu_strings[i] = StrDuplicate(L"Enroll hash from disk");
+ menu_strings[i] = L"Enroll hash from disk";
menu_item[i] = MOK_HASH_ENROLL;
i++;
@@ -1529,9 +1529,6 @@ static EFI_STATUS enter_mok_menu(EFI_HANDLE image_handle,
out:
console_reset();
- for (i=0; menu_strings[i] != NULL; i++)
- FreePool(menu_strings[i]);
-
FreePool(menu_strings);
if (menu_item)