mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Free title earlier, from Alexis Hildebrandt.
This commit is contained in:
		@@ -316,6 +316,7 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
	else
 | 
			
		||||
		title = xstrdup("");
 | 
			
		||||
	menu = menu_create(title);
 | 
			
		||||
	free(title);
 | 
			
		||||
 | 
			
		||||
	for (i = 0; i != count; /* nothing */) {
 | 
			
		||||
		name = args_string(args, i++);
 | 
			
		||||
@@ -326,7 +327,6 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
 | 
			
		||||
		if (count - i < 2) {
 | 
			
		||||
			cmdq_error(item, "not enough arguments");
 | 
			
		||||
			free(title);
 | 
			
		||||
			menu_free(menu);
 | 
			
		||||
			return (CMD_RETURN_ERROR);
 | 
			
		||||
		}
 | 
			
		||||
@@ -338,7 +338,6 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
 | 
			
		||||
		menu_add_item(menu, &menu_item, item, tc, target);
 | 
			
		||||
	}
 | 
			
		||||
	free(title);
 | 
			
		||||
	if (menu == NULL) {
 | 
			
		||||
		cmdq_error(item, "invalid menu arguments");
 | 
			
		||||
		return (CMD_RETURN_ERROR);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user