mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
source-file and some other commands can recurse back into cmdq_continue,
which could potentially free the currently running command, so we need to take a reference to it in cmdq_continue_one. Fixes problem reported by Theo Buehler.
This commit is contained in:
5
cfg.c
5
cfg.c
@ -129,7 +129,10 @@ load_cfg(const char *path, struct cmd_q *cmdq, int quiet)
|
||||
static void
|
||||
cfg_default_done(__unused struct cmd_q *cmdq)
|
||||
{
|
||||
if (--cfg_references != 0)
|
||||
log_debug("%s: %u references%s", __func__, cfg_references,
|
||||
cfg_finished ? " (finished)" : "");
|
||||
|
||||
if (cfg_finished || --cfg_references != 0)
|
||||
return;
|
||||
cfg_finished = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user