patch 9.1.0678: [security]: use-after-free in alist_add()

Problem:  [security]: use-after-free in alist_add()
          (SuyueGuo)
Solution: Lock the current window, so that the reference to
          the argument list remains valid.

This fixes CVE-2024-43374

Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/proto/window.pro b/src/proto/window.pro
index 26c7040..441070e 100644
--- a/src/proto/window.pro
+++ b/src/proto/window.pro
@@ -100,4 +100,5 @@
 int get_tab_number(tabpage_T *tp);
 char *check_colorcolumn(win_T *wp);
 int get_last_winid(void);
+int win_locked(win_T *wp);
 /* vim: set ft=c : */