Skip to content

Commit 4e303c8

Browse files
committed
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)
1 parent f951416 commit 4e303c8

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/ex_getln.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,7 @@ getcmdline_int(
13781378
redrawcmd();
13791379
goto cmdline_changed;
13801380
}
1381+
vim_free(p);
13811382
}
13821383
}
13831384
beep_flush();

src/move.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,7 @@ scroll_cursor_bot(int min_scroll, int set_topbot)
19611961
scrolled += loff.height;
19621962
if (loff.lnum == curwin->w_botline
19631963
#ifdef FEAT_DIFF
1964-
&& boff.fill == 0
1964+
&& loff.fill == 0
19651965
#endif
19661966
)
19671967
scrolled -= curwin->w_empty_rows;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
543,
795797
/**/
796798
542,
797799
/**/

0 commit comments

Comments
 (0)