mirror of
https://github.com/tmux/tmux.git
synced 2025-01-09 01:28:49 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
b791f00bf1
@ -315,6 +315,7 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
else
|
else
|
||||||
title = xstrdup("");
|
title = xstrdup("");
|
||||||
menu = menu_create(title);
|
menu = menu_create(title);
|
||||||
|
free(title);
|
||||||
|
|
||||||
for (i = 0; i != count; /* nothing */) {
|
for (i = 0; i != count; /* nothing */) {
|
||||||
name = args_string(args, i++);
|
name = args_string(args, i++);
|
||||||
@ -325,7 +326,6 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
|
|
||||||
if (count - i < 2) {
|
if (count - i < 2) {
|
||||||
cmdq_error(item, "not enough arguments");
|
cmdq_error(item, "not enough arguments");
|
||||||
free(title);
|
|
||||||
menu_free(menu);
|
menu_free(menu);
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
@ -337,7 +337,6 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
|
|
||||||
menu_add_item(menu, &menu_item, item, tc, target);
|
menu_add_item(menu, &menu_item, item, tc, target);
|
||||||
}
|
}
|
||||||
free(title);
|
|
||||||
if (menu == NULL) {
|
if (menu == NULL) {
|
||||||
cmdq_error(item, "invalid menu arguments");
|
cmdq_error(item, "invalid menu arguments");
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
|
Loading…
Reference in New Issue
Block a user