summaryrefslogtreecommitdiffstats
path: root/src/globals.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-28 20:34:52 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-28 20:34:52 +0000
commit84497cd06f06516f6ce727ea00c47792ce16dc70 (patch)
tree5cba204eafbd2506cc306d610f646f23d65a2d9b /src/globals.h
parentf86490ed4fdab213a28f667abd055c023a73d645 (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/globals.h')
-rw-r--r--src/globals.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/globals.h b/src/globals.h
index eadff43c99..e69856801e 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -984,8 +984,9 @@ EXTERN win_T *curwin; // currently active window
#define AUCMD_WIN_COUNT 5
typedef struct {
- win_T *auc_win; // window used in aucmd_prepbuf()
- int auc_win_used; // this auc_win is being used
+ win_T *auc_win; // Window used in aucmd_prepbuf(). When not NULL the
+ // window has been allocated.
+ int auc_win_used; // This auc_win is being used.
} aucmdwin_T;
EXTERN aucmdwin_T aucmd_win[AUCMD_WIN_COUNT];