Patch 8.2.3001

3 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 15, 2021, 5:27:58 AM6/15/21
to vim...@googlegroups.com

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 -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages