To: vim_dev@googlegroups.com Subject: Patch 8.2.3001 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///