changeset 15064:7b2dcca9e0c1 v8.1.0543

patch 8.1.0543: Coverity warns for leaking memory and using wrong struct commit https://github.com/vim/vim/commit/4e303c8ba8dcd0566a1ad7c82ff18eb016eea335 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 24 14:27:44 2018 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Nov 2018 14:30:08 +0100
parents 8f098d4eca24
children 1916cdaefb0e
files src/ex_getln.c src/move.c src/version.c
diffstat 3 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1378,6 +1378,7 @@ getcmdline_int(
 			    redrawcmd();
 			    goto cmdline_changed;
 			}
+			vim_free(p);
 		    }
 		}
 		beep_flush();
--- a/src/move.c
+++ b/src/move.c
@@ -1961,7 +1961,7 @@ scroll_cursor_bot(int min_scroll, int se
 	    scrolled += loff.height;
 	    if (loff.lnum == curwin->w_botline
 #ifdef FEAT_DIFF
-			    && boff.fill == 0
+			    && loff.fill == 0
 #endif
 		    )
 		scrolled -= curwin->w_empty_rows;
--- a/src/version.c
+++ b/src/version.c
@@ -793,6 +793,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    543,
+/**/
     542,
 /**/
     541,