mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.3001: Vim9: memory leak when compilation fails
Problem: Vim9: memory leak when compilation fails. Solution: Free the list of variable names.
This commit is contained in:
parent
3b814af7e1
commit
caf1a2f296
@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
3001,
|
||||
/**/
|
||||
3000,
|
||||
/**/
|
||||
|
@ -9724,8 +9724,10 @@ erret:
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user