Mercurial > vim
comparison src/vim9compile.c @ 23082:2120e4b40e12 v8.2.2087
patch 8.2.2087: Vim9: memory leak when statement is truncated
Commit: https://github.com/vim/vim/commit/21e51221f2c4f301912a5d59c748351b02c3df9e
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 4 12:43:29 2020 +0100
patch 8.2.2087: Vim9: memory leak when statement is truncated
Problem: Vim9: memory leak when statement is truncated.
Solution: Increment the number of local variables.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 04 Dec 2020 12:45:04 +0100 |
parents | 4b398a229b0b |
children | 285cde4b8d0e |
comparison
equal
deleted
inserted
replaced
23081:8352e4d605ed | 23082:2120e4b40e12 |
---|---|
5667 --cctx->ctx_locals.ga_len; | 5667 --cctx->ctx_locals.ga_len; |
5668 instr_count = instr->ga_len; | 5668 instr_count = instr->ga_len; |
5669 wp = op + oplen; | 5669 wp = op + oplen; |
5670 p = skipwhite(wp); | 5670 p = skipwhite(wp); |
5671 if (may_get_next_line_error(wp, &p, cctx) == FAIL) | 5671 if (may_get_next_line_error(wp, &p, cctx) == FAIL) |
5672 { | |
5673 if (new_local) | |
5674 ++cctx->ctx_locals.ga_len; | |
5672 goto theend; | 5675 goto theend; |
5676 } | |
5673 r = compile_expr0_ext(&p, cctx, &is_const); | 5677 r = compile_expr0_ext(&p, cctx, &is_const); |
5674 if (new_local) | 5678 if (new_local) |
5675 ++cctx->ctx_locals.ga_len; | 5679 ++cctx->ctx_locals.ga_len; |
5676 if (r == FAIL) | 5680 if (r == FAIL) |
5677 goto theend; | 5681 goto theend; |