mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	If command parsing fails in the client, report the error rather than
trying to send the command to the server. GitHub issue 4372 from Nikola Tadic.
This commit is contained in:
		
							
								
								
									
										7
									
								
								client.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								client.c
									
									
									
									
									
								
							@@ -267,8 +267,13 @@ client_main(struct event_base *base, int argc, char **argv, uint64_t flags,
 | 
				
			|||||||
			if (cmd_list_any_have(pr->cmdlist, CMD_STARTSERVER))
 | 
								if (cmd_list_any_have(pr->cmdlist, CMD_STARTSERVER))
 | 
				
			||||||
				flags |= CLIENT_STARTSERVER;
 | 
									flags |= CLIENT_STARTSERVER;
 | 
				
			||||||
			cmd_list_free(pr->cmdlist);
 | 
								cmd_list_free(pr->cmdlist);
 | 
				
			||||||
		} else
 | 
							} else {
 | 
				
			||||||
 | 
								fprintf(stderr, "%s\n", pr->error);
 | 
				
			||||||
 | 
								args_free_values(values, argc);
 | 
				
			||||||
 | 
								free(values);
 | 
				
			||||||
			free(pr->error);
 | 
								free(pr->error);
 | 
				
			||||||
 | 
								return 1;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		args_free_values(values, argc);
 | 
							args_free_values(values, argc);
 | 
				
			||||||
		free(values);
 | 
							free(values);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user