1
0
mirror of https://github.com/tmux/tmux.git synced 2025-03-25 07:18:48 +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:
nicm 2025-02-26 07:47:46 +00:00
parent 9a8f46e554
commit d938ab5dd7

View File

@ -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))
flags |= CLIENT_STARTSERVER;
cmd_list_free(pr->cmdlist);
} else
} else {
fprintf(stderr, "%s\n", pr->error);
args_free_values(values, argc);
free(values);
free(pr->error);
return 1;
}
args_free_values(values, argc);
free(values);
}