summaryrefslogtreecommitdiffstats
path: root/commands/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/menu.c')
-rw-r--r--commands/menu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/commands/menu.c b/commands/menu.c
index b874ccb464..f3bd78de72 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;