From: Bram Moolenaar Date: Sat, 16 Dec 2017 18:05:22 +0000 (+0100) Subject: patch 8.0.1396: memory leak when CTRL-G in search command line fails X-Git-Tag: v8.0.1396 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1d5c154dbd5fbe317726bbf2ba99632b91878f4;p=vim 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". --- diff --git a/src/ex_getln.c b/src/ex_getln.c index 7c553e42e..405e1f655 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -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; diff --git a/src/version.c b/src/version.c index 0b1733827..224118a11 100644 --- a/src/version.c +++ b/src/version.c @@ -771,6 +771,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1396, /**/ 1395, /**/