commit | 335e67132265b068f39f3671e5dff2aecd1bf403 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sat Oct 17 22:58:21 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Sat Oct 17 22:58:21 2020 +0200 |
tree | 4ab954fd4cc9d86792207844a17c6f5de169acac | |
parent | 352134bbfbff4831a3f6a3383d9e2d8660016243 [diff] [blame] |
patch 8.2.1860: Vim9: memory leak when throwing empty string Problem: Vim9: memory leak when throwing empty string. Solution: Free the empty string.
diff --git a/src/vim9execute.c b/src/vim9execute.c index 31b67d1..673bf91 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c
@@ -2094,6 +2094,7 @@ if (tv->vval.v_string == NULL || *skipwhite(tv->vval.v_string) == NUL) { + vim_free(tv->vval.v_string); emsg(_(e_throw_with_empty_string)); goto failed; }