Patch 8.2.3001
Problem:    Vim9: memory leak when compilation fails.
Solution:   Free the list of variable names.
Files:      src/vim9compile.c


*** ../vim-8.2.3000/src/vim9compile.c   2021-06-15 10:22:11.683669412 +0200
--- src/vim9compile.c   2021-06-15 11:21:24.310591451 +0200
***************
*** 9724,9731 ****
--- 9724,9733 ----
        dfunc_T *dfunc = ((dfunc_T *)def_functions.ga_data)
                                                         + ufunc->uf_dfunc_idx;
  
+       // Compiling aborted, free the generated instructions.
        clear_instr_ga(instr);
        VIM_CLEAR(dfunc->df_name);
+       ga_clear_strings(&dfunc->df_var_names);
  
        // If using the last entry in the table and it was added above, we
        // might as well remove it.
*** ../vim-8.2.3000/src/version.c       2021-06-15 10:22:11.683669412 +0200
--- src/version.c       2021-06-15 11:27:00.285749314 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     3001,
  /**/

-- 
For large projects, Team Leaders use sophisticated project management software
to keep track of who's doing what.  The software collects the lies and guesses
of the project team and organizes them in to instantly outdated charts that
are too boring to look at closely.  This is called "planning".
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/202106150927.15F9Rnhe1063907%40masaka.moolenaar.net.

Raspunde prin e-mail lui