From c9d2ff8c40d31b85e6165f387f00c11c4f607915 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Sat, 6 Oct 2012 17:30:49 -0400 Subject: [PATCH] Free menus and add statics Make sure we free menu items after exiting a menu. Also, add some missing static annotations. --- MokManager.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/MokManager.c b/MokManager.c index 71d6b4b..aa3c116 100644 --- a/MokManager.c +++ b/MokManager.c @@ -599,7 +599,7 @@ static UINTN mok_deletion_prompt (void *MokNew, void *data2) { return 0; } -void draw_menu (struct menu_item *items, UINTN count) { +static void draw_menu (struct menu_item *items, UINTN count) { UINTN i; uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); @@ -614,7 +614,18 @@ void draw_menu (struct menu_item *items, UINTN count) { uefi_call_wrapper(ST->ConOut->EnableCursor, 2, ST->ConOut, TRUE); } -void run_menu (struct menu_item *items, UINTN count) { +static void free_menu (struct menu_item *items, UINTN count) { + UINTN i; + + for (i=0; i