Mercurial > vim
diff src/ex_docmd.c @ 20996:3af71cbcfdbe v8.2.1049
patch 8.2.1049: Vim9: leaking memory when using continuation line
Commit: https://github.com/vim/vim/commit/b171fb179053fa631fec74911b5fb9374cb6a8a1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 24 20:34:03 2020 +0200
patch 8.2.1049: Vim9: leaking memory when using continuation line
Problem: Vim9: leaking memory when using continuation line.
Solution: Keep a pointer to the continuation line in evalarg_T. Centralize
checking for a next command.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 24 Jun 2020 20:45:04 +0200 |
parents | bb49b5090a9c |
children | 0738c44504cb |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2609,6 +2609,7 @@ doend: #ifdef FEAT_EVAL --ex_nesting_level; + vim_free(ea.cmdline_tofree); #endif return ea.nextcmd; @@ -4912,7 +4913,7 @@ ex_colorscheme(exarg_T *eap) if (expr != NULL) { ++emsg_off; - p = eval_to_string(expr, NULL, FALSE); + p = eval_to_string(expr, FALSE); --emsg_off; vim_free(expr); }