# HG changeset patch # User Christian Brabandt # Date 1513448105 -3600 # Node ID 5f3aff09d8f84d1bc589ee25c66f6a5221524a8a # Parent 2d319c0ac54bb312c71305289275e41af36d7bf9 patch 8.0.1396: memory leak when CTRL-G in search command line fails commit https://github.com/vim/vim/commit/a1d5c154dbd5fbe317726bbf2ba99632b91878f4 Author: Bram Moolenaar Date: Sat Dec 16 19:05:22 2017 +0100 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 --- 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 --- a/src/version.c +++ b/src/version.c @@ -772,6 +772,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1396, +/**/ 1395, /**/ 1394,