mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 08:18:48 +00:00
Do not double free expanded path in source-file, also remove some
unnecessary assignments.
This commit is contained in:
parent
c0048d6d20
commit
72d905f32c
@ -121,8 +121,6 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item,
|
|||||||
if (sr != NULL)
|
if (sr != NULL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (line == lines)
|
|
||||||
ranges = &tc->status.entries[0].ranges;
|
|
||||||
|
|
||||||
if (sr != NULL) {
|
if (sr != NULL) {
|
||||||
format_add(ft, "popup_window_status_line_x", "%u",
|
format_add(ft, "popup_window_status_line_x", "%u",
|
||||||
|
@ -180,12 +180,12 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
free(pattern);
|
free(pattern);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
free(expanded);
|
|
||||||
free(pattern);
|
free(pattern);
|
||||||
|
|
||||||
for (j = 0; j < g.gl_pathc; j++)
|
for (j = 0; j < g.gl_pathc; j++)
|
||||||
cmd_source_file_add(cdata, g.gl_pathv[j]);
|
cmd_source_file_add(cdata, g.gl_pathv[j]);
|
||||||
}
|
}
|
||||||
|
free(expanded);
|
||||||
|
|
||||||
cdata->after = item;
|
cdata->after = item;
|
||||||
cdata->retval = retval;
|
cdata->retval = retval;
|
||||||
|
4
file.c
4
file.c
@ -558,7 +558,7 @@ file_write_open(struct client_files *files, struct tmuxpeer *peer,
|
|||||||
log_debug("open write file %d %s", msg->stream, path);
|
log_debug("open write file %d %s", msg->stream, path);
|
||||||
|
|
||||||
find.stream = msg->stream;
|
find.stream = msg->stream;
|
||||||
if ((cf = RB_FIND(client_files, files, &find)) != NULL) {
|
if (RB_FIND(client_files, files, &find) != NULL) {
|
||||||
error = EBADF;
|
error = EBADF;
|
||||||
goto reply;
|
goto reply;
|
||||||
}
|
}
|
||||||
@ -717,7 +717,7 @@ file_read_open(struct client_files *files, struct tmuxpeer *peer,
|
|||||||
log_debug("open read file %d %s", msg->stream, path);
|
log_debug("open read file %d %s", msg->stream, path);
|
||||||
|
|
||||||
find.stream = msg->stream;
|
find.stream = msg->stream;
|
||||||
if ((cf = RB_FIND(client_files, files, &find)) != NULL) {
|
if (RB_FIND(client_files, files, &find) != NULL) {
|
||||||
error = EBADF;
|
error = EBADF;
|
||||||
goto reply;
|
goto reply;
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ server_client_open(struct client *c, char **cause)
|
|||||||
static void
|
static void
|
||||||
server_client_attached_lost(struct client *c)
|
server_client_attached_lost(struct client *c)
|
||||||
{
|
{
|
||||||
struct session *s = c->session;
|
struct session *s;
|
||||||
struct window *w;
|
struct window *w;
|
||||||
struct client *loop;
|
struct client *loop;
|
||||||
struct client *found;
|
struct client *found;
|
||||||
|
Loading…
Reference in New Issue
Block a user