mirror of
https://github.com/tmux/tmux.git
synced 2025-01-09 09:38:48 +00:00
Do not leak screen in popups, GitHub issue 3492.
This commit is contained in:
parent
ac4bb89d43
commit
a9ac614691
@ -276,6 +276,7 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item,
|
|||||||
log_debug("%s: -y: %s = %s = %u (-h %u)", __func__, yp, p, *py, h);
|
log_debug("%s: -y: %s = %s = %u (-h %u)", __func__, yp, p, *py, h);
|
||||||
free(p);
|
free(p);
|
||||||
|
|
||||||
|
format_free(ft);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,11 +471,13 @@ cmd_display_popup_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
cmd_free_argv(argc, argv);
|
cmd_free_argv(argc, argv);
|
||||||
if (env != NULL)
|
if (env != NULL)
|
||||||
environ_free(env);
|
environ_free(env);
|
||||||
|
free(cwd);
|
||||||
free(title);
|
free(title);
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
}
|
}
|
||||||
if (env != NULL)
|
if (env != NULL)
|
||||||
environ_free(env);
|
environ_free(env);
|
||||||
|
free(cwd);
|
||||||
free(title);
|
free(title);
|
||||||
cmd_free_argv(argc, argv);
|
cmd_free_argv(argc, argv);
|
||||||
return (CMD_RETURN_WAIT);
|
return (CMD_RETURN_WAIT);
|
||||||
|
1
popup.c
1
popup.c
@ -253,6 +253,7 @@ popup_draw_cb(struct client *c, void *data, struct screen_redraw_ctx *rctx)
|
|||||||
tty_draw_line(tty, &s, 0, i, pd->sx, px, py + i, &defaults,
|
tty_draw_line(tty, &s, 0, i, pd->sx, px, py + i, &defaults,
|
||||||
palette);
|
palette);
|
||||||
}
|
}
|
||||||
|
screen_free(&s);
|
||||||
if (pd->md != NULL) {
|
if (pd->md != NULL) {
|
||||||
c->overlay_check = NULL;
|
c->overlay_check = NULL;
|
||||||
c->overlay_data = NULL;
|
c->overlay_data = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user