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:
Jan Edmund Lazo
2019-05-11 15:53:59 -04:00
committed by Justin M. Keyes
parent da3c0e4962
commit 7c9d4d971c

View File

@@ -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) {