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)
diff --git a/src/move.c b/src/move.c
index 214c362..a94a1ab 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1961,7 +1961,7 @@
scrolled += loff.height;
if (loff.lnum == curwin->w_botline
#ifdef FEAT_DIFF
- && boff.fill == 0
+ && loff.fill == 0
#endif
)
scrolled -= curwin->w_empty_rows;