mirror of
https://github.com/tmate-io/tmate.git
synced 2026-07-28 13:23:50 +00:00
Memory leaks and an uninitialized part of utf8_data, from Patrick Palka.
This commit is contained in:
parent
40fefe2cbc
commit
933929cd62
3 changed files with 3 additions and 1 deletions
|
|
@ -97,6 +97,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||
cmd = args->argv[1];
|
||||
else if (args->argc == 3)
|
||||
cmd = args->argv[2];
|
||||
free(shellcmd);
|
||||
if (cmd == NULL)
|
||||
return (CMD_RETURN_NORMAL);
|
||||
if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ cmd_new_window_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||
ft = format_create();
|
||||
format_defaults(ft, cmd_find_client(cmdq, NULL, 1), s, NULL,
|
||||
NULL);
|
||||
cwd = format_expand(ft, args_get(args, 'c'));
|
||||
cwd = to_free = format_expand(ft, args_get(args, 'c'));
|
||||
format_free(ft);
|
||||
} else if (cmdq->client != NULL && cmdq->client->session == NULL)
|
||||
cwd = cmdq->client->cwd;
|
||||
|
|
|
|||
1
utf8.c
1
utf8.c
|
|
@ -355,6 +355,7 @@ utf8_set(struct utf8_data *ud, u_char ch)
|
|||
u_int i;
|
||||
|
||||
*ud->data = ch;
|
||||
ud->have = 1;
|
||||
ud->size = 1;
|
||||
|
||||
ud->width = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue