vim-patch:9.0.0967: leaking memory from autocmd windows

Problem:    Leaking memory from autocmd windows.
Solution:   Free window when auc_win is not NULL.

84497cd06f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-29 19:02:29 +08:00
parent 3173d07564
commit 95f5cf9691
4 changed files with 17 additions and 16 deletions

View File

@@ -4174,8 +4174,9 @@ bool garbage_collect(bool testing)
ABORTING(set_ref_in_fmark)(wp->w_jumplist[i].fmark, copyID);
}
}
// 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) {
ABORTING(set_ref_in_item)(&aucmd_win[i].auc_win->w_winvar.di_tv, copyID, NULL, NULL);
}
}