diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-25 16:31:51 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-25 16:31:51 +0000 |
commit | ef2c325f5e3c437b722bb96bf369ba2a5c541163 (patch) | |
tree | dc85f0dc98dce1937b459d8d3882473f25db03c3 /src/terminal.c | |
parent | c1cf4c91072f91b6b8dd636627a4ddf6f4b21f16 (diff) |
patch 9.0.0949: crash when unletting a variable while listing variablesv9.0.0949
Problem: Crash when unletting a variable while listing variables.
Solution: Disallow changing a hashtable while going over the entries.
(closes #11435)
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c index bc363175f9..d300c59a24 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -1020,7 +1020,7 @@ term_write_session(FILE *fd, win_T *wp, hashtab_T *terminal_bufs) char *hash_key = alloc(NUMBUFLEN); vim_snprintf(hash_key, NUMBUFLEN, "%d", bufnr); - hash_add(terminal_bufs, (char_u *)hash_key); + hash_add(terminal_bufs, (char_u *)hash_key, "terminal session"); } return put_eol(fd); |