Skip to content

Commit

Permalink
patch 8.2.4076: memory leak in autoload import
Browse files Browse the repository at this point in the history
Problem:    Memory leak in autoload import.
Solution:   Do not overwrite the autoload prefix.
  • Loading branch information
brammool committed Jan 13, 2022
1 parent 78a7053 commit 71930f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4076,
/**/
4075,
/**/
Expand Down
3 changes: 2 additions & 1 deletion src/vim9script.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ ex_vim9script(exarg_T *eap UNUSED)
si->sn_state = SN_STATE_HAD_COMMAND;

// Store the prefix with the script. It isused to find exported functions.
si->sn_autoload_prefix = get_autoload_prefix(si);
if (si->sn_autoload_prefix == NULL)
si->sn_autoload_prefix = get_autoload_prefix(si);

current_sctx.sc_version = SCRIPT_VERSION_VIM9;
si->sn_version = SCRIPT_VERSION_VIM9;
Expand Down

0 comments on commit 71930f1

Please sign in to comment.