Patch 8.2.2087
Problem:    Vim9: memory leak when statement is truncated.
Solution:   Increment the number of local variables.
Files:      src/vim9compile.c


*** ../vim-8.2.2086/src/vim9compile.c   2020-12-02 17:36:49.173409740 +0100
--- src/vim9compile.c   2020-12-04 12:40:16.266937523 +0100
***************
*** 5669,5675 ****
--- 5669,5679 ----
                    wp = op + oplen;
                    p = skipwhite(wp);
                    if (may_get_next_line_error(wp, &p, cctx) == FAIL)
+                   {
+                       if (new_local)
+                           ++cctx->ctx_locals.ga_len;
                        goto theend;
+                   }
                    r = compile_expr0_ext(&p, cctx, &is_const);
                    if (new_local)
                        ++cctx->ctx_locals.ga_len;
*** ../vim-8.2.2086/src/version.c       2020-12-03 21:24:04.089645975 +0100
--- src/version.c       2020-12-04 12:43:09.610427783 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2087,
  /**/

-- 
If "R" is Reverse, how come "D" is FORWARD?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202012041144.0B4Bi2Sk481290%40masaka.moolenaar.net.

Raspunde prin e-mail lui