Mercurial > vim
changeset 27094:70ad00a80185 v8.2.4076
patch 8.2.4076: memory leak in autoload import
Commit: https://github.com/vim/vim/commit/71930f174d47ef7765e9180df58f597cec71dec7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 13 13:47:43 2022 +0000
patch 8.2.4076: memory leak in autoload import
Problem: Memory leak in autoload import.
Solution: Do not overwrite the autoload prefix.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Jan 2022 15:00:05 +0100 |
parents | c73d6b2a8d76 |
children | 06c789261b1b |
files | src/version.c src/vim9script.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4076, +/**/ 4075, /**/ 4074,
--- a/src/vim9script.c +++ b/src/vim9script.c @@ -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;