patch 8.0.0782: using freed memory in quickfix code
Problem: Using freed memory in quickfix code. (Dominique Pelle)
Solution: Handle a help window differently. (Yegappan Lakshmanan)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 9c84e24..6ec3ded 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -6314,7 +6314,7 @@
* Re-use an existing help window or open a new one.
* Always open a new one for ":tab help".
*/
- if (!curwin->w_buffer->b_help
+ if (!bt_help(curwin->w_buffer)
#ifdef FEAT_WINDOWS
|| cmdmod.tab != 0
#endif
@@ -6325,7 +6325,7 @@
wp = NULL;
else
FOR_ALL_WINDOWS(wp)
- if (wp->w_buffer != NULL && wp->w_buffer->b_help)
+ if (bt_help(wp->w_buffer))
break;
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
win_enter(wp, TRUE);
@@ -6425,7 +6425,7 @@
FOR_ALL_WINDOWS(win)
{
- if (win->w_buffer->b_help)
+ if (bt_help(win->w_buffer))
{
win_close(win, FALSE);
return;