diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-24 20:34:03 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-24 20:34:03 +0200 |
commit | b171fb179053fa631fec74911b5fb9374cb6a8a1 (patch) | |
tree | c45ae9287bf07033cc4f3bf43529b7548ba432c9 /src/ex_docmd.c | |
parent | 9d40c63c7dc8c3eb3886c58dcd334bc7f37eceba (diff) |
patch 8.2.1049: Vim9: leaking memory when using continuation linev8.2.1049
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.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 4755a01b48..6c887fae1c 100644 --- 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); } |