diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-07 12:12:43 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-07 12:12:43 +0100 |
commit | 983d83ff1cd796ff321074335fa53fbe7ac45a46 (patch) | |
tree | 04500912b576c2c91010495406d7e7332053c78f /src/structs.h | |
parent | dfc3db76b9de217542cc9258301c1b4818a51cd0 (diff) | |
download | vim-git-983d83ff1cd796ff321074335fa53fbe7ac45a46.tar.gz |
patch 8.2.2476: using freed memory when splitting window while closing bufferv8.2.2476
Problem: Using freed memory when using an autocommand to split a window
while a buffer is being closed.
Solution: Disallow splitting when the buffer has b_locked_split set.
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h index 6cdfb4fc5..8d86d11b1 100644 --- a/src/structs.h +++ b/src/structs.h @@ -2633,6 +2633,8 @@ struct file_buffer int b_flags; // various BF_ flags int b_locked; // Buffer is being closed or referenced, don't // let autocommands wipe it out. + int b_locked_split; // Buffer is being closed, don't allow opening + // a new window with it. /* * b_ffname has the full path of the file (NULL for no name). |