summaryrefslogtreecommitdiffstats
path: root/common/boot.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-09-13 14:56:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-09-13 14:56:05 +0200
commit6b8ae8f2e1eea2fa7bc82ffaaa747617de926013 (patch)
tree88c49e20d0090d8d380c80f8fb15e1a3c517667c /common/boot.c
parentb2c398f44031efc3c6ab2bec19f56df0c05ad3de (diff)
parentbf2abf90501858a97bf1e05024d963800312a5c4 (diff)
downloadbarebox-6b8ae8f2e1eea2fa7bc82ffaaa747617de926013.tar.gz
barebox-6b8ae8f2e1eea2fa7bc82ffaaa747617de926013.tar.xz
Merge branch 'for-next/menu'
Diffstat (limited to 'common/boot.c')
-rw-r--r--common/boot.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/boot.c b/common/boot.c
index df9cba5b22..a971cb7a30 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -43,7 +43,7 @@ struct bootentries *bootentries_alloc(void)
if (IS_ENABLED(CONFIG_MENU)) {
bootentries->menu = menu_alloc();
- bootentries->menu->display = basprintf("boot");
+ menu_add_title(bootentries->menu, basprintf("boot"));
}
return bootentries;
@@ -61,8 +61,12 @@ void bootentries_free(struct bootentries *bootentries)
be->release(be);
}
- if (bootentries->menu)
+ if (bootentries->menu) {
+ int i;
+ for (i = 0; i < bootentries->menu->display_lines; i++)
+ free(bootentries->menu->display[i]);
free(bootentries->menu->display);
+ }
free(bootentries->menu);
free(bootentries);
}
@@ -165,7 +169,6 @@ static void bootscript_entry_release(struct bootentry *entry)
struct bootentry_script *bs = container_of(entry, struct bootentry_script, entry);
free(bs->scriptpath);
- free(bs->entry.me.display);
free(bs);
}
@@ -320,6 +323,7 @@ void bootsources_menu(struct bootentries *bootentries, int timeout)
menu_show(bootentries->menu);
+ menu_remove_entry(bootentries->menu, back_entry);
free(back_entry);
}