patch 9.0.0967: leaking memory from autocmd windows
Problem: Leaking memory from autocmd windows.
Solution: Free window when auc_win is not NULL.
diff --git a/src/globals.h b/src/globals.h
index eadff43..e698568 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -984,8 +984,9 @@
#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];