From: Bram Moolenaar Date: Sun, 10 May 2020 21:11:53 +0000 (+0200) Subject: patch 8.2.0734: Vim9: leaking memory when using :finish X-Git-Tag: v8.2.0734 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04816717dfea6e2469ff4c9d40f68b59aaf03724;p=vim patch 8.2.0734: Vim9: leaking memory when using :finish Problem: Vim9: leaking memory when using :finish. Solution: Do not check for next line in third pass. --- diff --git a/src/scriptfile.c b/src/scriptfile.c index 86e8b0110..7a148a7c8 100644 --- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -1773,7 +1773,11 @@ getsourceline(int c UNUSED, void *cookie, int indent UNUSED, int do_concat) // Only concatenate lines starting with a \ when 'cpoptions' doesn't // contain the 'C' flag. - if (line != NULL && do_concat && vim_strchr(p_cpo, CPO_CONCAT) == NULL) + if (line != NULL && do_concat && vim_strchr(p_cpo, CPO_CONCAT) == NULL +#ifdef FEAT_EVAL + && sp->use_lines_ga < 0 +#endif + ) { // compensate for the one line read-ahead --sp->sourcing_lnum; diff --git a/src/version.c b/src/version.c index 9dc3c22e5..19920dea8 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 734, /**/ 733, /**/