Permalink
Browse files

patch 8.0.1396: memory leak when CTRL-G in search command line fails

Problem:    Memory leak when CTRL-G in search command line fails.
Solution:   Move restore_last_search_pattern to after "if".
  • Loading branch information...
brammool committed Dec 16, 2017
1 parent 200d0e3 commit a1d5c154dbd5fbe317726bbf2ba99632b91878f4
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/ex_getln.c
  2. +2 −0 src/version.c
View
@@ -1810,11 +1810,11 @@ getcmdline(
# endif
old_botline = curwin->w_botline;
update_screen(NOT_VALID);
restore_last_search_pattern();
redrawcmdline();
}
else
vim_beep(BO_ERROR);
restore_last_search_pattern();
goto cmdline_not_changed;
}
break;
View
@@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1396,
/**/
1395,
/**/

0 comments on commit a1d5c15

Please sign in to comment.