mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.3115: Coverity complains about free_wininfo() use
Problem: Coverity complains about free_wininfo() use. Solution: Add a condition that "wip2" is not equal to "wip". (Neovim #14996)
This commit is contained in:
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3115,
|
||||||
/**/
|
/**/
|
||||||
3114,
|
3114,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -5057,8 +5057,9 @@ win_free(
|
|||||||
|
|
||||||
// If there already is an entry with "wi_win" set to NULL it
|
// If there already is an entry with "wi_win" set to NULL it
|
||||||
// must be removed, it would never be used.
|
// 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)
|
for (wip2 = buf->b_wininfo; wip2 != NULL; wip2 = wip2->wi_next)
|
||||||
if (wip2->wi_win == NULL)
|
if (wip2 != wip && wip2->wi_win == NULL)
|
||||||
{
|
{
|
||||||
if (wip2->wi_next != NULL)
|
if (wip2->wi_next != NULL)
|
||||||
wip2->wi_next->wi_prev = wip2->wi_prev;
|
wip2->wi_next->wi_prev = wip2->wi_prev;
|
||||||
|
Reference in New Issue
Block a user