diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-28 20:34:52 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-28 20:34:52 +0000 |
commit | 84497cd06f06516f6ce727ea00c47792ce16dc70 (patch) | |
tree | 5cba204eafbd2506cc306d610f646f23d65a2d9b /src/eval.c | |
parent | f86490ed4fdab213a28f667abd055c023a73d645 (diff) |
patch 9.0.0967: leaking memory from autocmd windowsv9.0.0967
Problem: Leaking memory from autocmd windows.
Solution: Free window when auc_win is not NULL.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index c43158a29a..20883d4309 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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 |