[PATCH 8/9] menu: do not go to free if there's nothing to free
Sascha Hauer
s.hauer at pengutronix.de
Mon Aug 23 02:24:12 EDT 2010
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
commands/menu.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/commands/menu.c b/commands/menu.c
index b874ccb..f3bd78d 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -80,9 +80,8 @@ static int do_menu_entry_add(struct cmd_menu *cm)
}
me = menu_entry_alloc();
-
if (!me)
- goto free;
+ return -ENOMEM;
if (cm->submenu) {
me->action = menu_action_show;
--
1.7.1
More information about the barebox
mailing list