0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.0967: leaking memory from autocmd windows

Problem:    Leaking memory from autocmd windows.
Solution:   Free window when auc_win is not NULL.
This commit is contained in:
Bram Moolenaar
2022-11-28 20:34:52 +00:00
parent f86490ed4f
commit 84497cd06f
7 changed files with 21 additions and 20 deletions

View File

@@ -5084,8 +5084,9 @@ garbage_collect(int testing)
FOR_ALL_TAB_WINDOWS(tp, wp)
abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
NULL, NULL);
// window-local variables in autocmd windows
for (int i = 0; i < AUCMD_WIN_COUNT; ++i)
if (aucmd_win[i].auc_win_used)
if (aucmd_win[i].auc_win != NULL)
abort = abort || set_ref_in_item(
&aucmd_win[i].auc_win->w_winvar.di_tv, copyID, NULL, NULL);
#ifdef FEAT_PROP_POPUP