Patch 8.2.1733
Problem:    Vim9: memory leaks when using nested function.
Solution:   Free function when compilation fails.
Files:      src/vim9compile.c


*** ../vim-8.2.1732/src/vim9compile.c   2020-09-23 13:25:28.398827624 +0200
--- src/vim9compile.c   2020-09-23 18:47:54.402982730 +0200
***************
*** 4408,4414 ****
--- 4408,4417 ----
        return eap->skip ? (char_u *)"" : NULL;
      if (ufunc->uf_def_status == UF_TO_BE_COMPILED
            && compile_def_function(ufunc, TRUE, cctx) == FAIL)
+     {
+       func_ptr_unref(ufunc);
        return NULL;
+     }
  
      if (is_global)
      {
*** ../vim-8.2.1732/src/version.c       2020-09-23 17:41:09.845606730 +0200
--- src/version.c       2020-09-23 18:48:34.214882056 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1733,
  /**/

-- 
Lower life forms have more fun!

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202009231651.08NGpasI032859%40masaka.moolenaar.net.

Raspunde prin e-mail lui