mirror of
https://github.com/neovim/neovim.git
synced 2026-07-13 04:40:42 +00:00
vim-patch:8.1.0543: fix memory leak #10001
Problem: Coverity warns for leaking memory and using wrong struct.
Solution: Free pointer when allocation fails. Change "boff" to "loff".
(closes vim/vim#3634)
4e303c8ba8
This commit is contained in:
committed by
Justin M. Keyes
parent
da3c0e4962
commit
7c9d4d971c
@@ -1524,9 +1524,9 @@ void scroll_cursor_bot(int min_scroll, int set_topbot)
|
||||
/* Count screen lines that are below the window. */
|
||||
scrolled += loff.height;
|
||||
if (loff.lnum == curwin->w_botline
|
||||
&& boff.fill == 0
|
||||
)
|
||||
&& loff.fill == 0) {
|
||||
scrolled -= curwin->w_empty_rows;
|
||||
}
|
||||
}
|
||||
|
||||
if (boff.lnum < curbuf->b_ml.ml_line_count) {
|
||||
|
||||
Reference in New Issue
Block a user