From: Bram Moolenaar Date: Sat, 24 Nov 2018 13:27:44 +0000 (+0100) Subject: patch 8.1.0543: Coverity warns for leaking memory and using wrong struct X-Git-Tag: v8.1.0543 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e303c8ba8dcd0566a1ad7c82ff18eb016eea335;p=vim 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/ex_getln.c b/src/ex_getln.c index 31e646dd3..acccd2732 100644 --- 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(); diff --git a/src/move.c b/src/move.c index 214c362f4..a94a1ab9d 100644 --- a/src/move.c +++ b/src/move.c @@ -1961,7 +1961,7 @@ scroll_cursor_bot(int min_scroll, int set_topbot) scrolled += loff.height; if (loff.lnum == curwin->w_botline #ifdef FEAT_DIFF - && boff.fill == 0 + && loff.fill == 0 #endif ) scrolled -= curwin->w_empty_rows; diff --git a/src/version.c b/src/version.c index 82b8abe5d..2d7f2e624 100644 --- a/src/version.c +++ b/src/version.c @@ -792,6 +792,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 543, /**/ 542, /**/