Patch 8.2.3115
Problem: Coverity complains about free_wininfo() use.
Solution: Add a condition that "wip2" is not equal to "wip". (Neovim #14996)
Files: src/window.c
*** ../vim-8.2.3114/src/window.c 2021-06-27 22:03:28.649707714 +0200
--- src/window.c 2021-07-07 19:24:31.833697264 +0200
***************
*** 5057,5064 ****
// If there already is an entry with "wi_win" set to NULL it
// must be removed, it would never be used.
for (wip2 = buf->b_wininfo; wip2 != NULL; wip2 = wip2->wi_next)
! if (wip2->wi_win == NULL)
{
if (wip2->wi_next != NULL)
wip2->wi_next->wi_prev = wip2->wi_prev;
--- 5057,5065 ----
// If there already is an entry with "wi_win" set to NULL it
// must be removed, it would never be used.
+ // Skip "wip" itself, otherwise Coverity complains.
for (wip2 = buf->b_wininfo; wip2 != NULL; wip2 = wip2->wi_next)
! if (wip2 != wip && wip2->wi_win == NULL)
{
if (wip2->wi_next != NULL)
wip2->wi_next->wi_prev = wip2->wi_prev;
*** ../vim-8.2.3114/src/version.c 2021-07-06 20:15:42.696646607 +0200
--- src/version.c 2021-07-07 19:25:52.673570774 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3115,
/**/
--
Bare feet magnetize sharp metal objects so they point upward from the
floor -- especially in the dark.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///