mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.1.0543: Coverity warns for leaking memory and using wrong struct
Problem: Coverity warns for leaking memory and using wrong struct. Solution: Free pointer when allocation fails. Change "boff" to "loff". (closes #3634)
This commit is contained in:
@@ -1378,6 +1378,7 @@ getcmdline_int(
|
|||||||
redrawcmd();
|
redrawcmd();
|
||||||
goto cmdline_changed;
|
goto cmdline_changed;
|
||||||
}
|
}
|
||||||
|
vim_free(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
beep_flush();
|
beep_flush();
|
||||||
|
@@ -1961,7 +1961,7 @@ scroll_cursor_bot(int min_scroll, int set_topbot)
|
|||||||
scrolled += loff.height;
|
scrolled += loff.height;
|
||||||
if (loff.lnum == curwin->w_botline
|
if (loff.lnum == curwin->w_botline
|
||||||
#ifdef FEAT_DIFF
|
#ifdef FEAT_DIFF
|
||||||
&& boff.fill == 0
|
&& loff.fill == 0
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
scrolled -= curwin->w_empty_rows;
|
scrolled -= curwin->w_empty_rows;
|
||||||
|
@@ -792,6 +792,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 */
|
||||||
|
/**/
|
||||||
|
543,
|
||||||
/**/
|
/**/
|
||||||
542,
|
542,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user