diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-15 21:29:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-15 21:29:35 +0200 |
commit | 5ef2e762844e0eb1f5b213bd58e6bc38bdb69dac (patch) | |
tree | 44b4f268dd80448d2d25d51bd39eb7ad41f54154 /src | |
parent | 069c1e7fa9f45a665064f7f2c17da84d6a48f544 (diff) | |
download | vim-5ef2e762844e0eb1f5b213bd58e6bc38bdb69dac.zip |
patch 7.4.2045
Problem: Memory leak when using a function callback.
Solution: Don't save the function name when it's in the partial.
Diffstat (limited to 'src')
-rw-r--r-- | src/channel.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c index 90ef9741a..ae5bdf220 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1122,7 +1122,12 @@ set_callback( { free_callback(*cbp, *pp); if (callback != NULL && *callback != NUL) - *cbp = vim_strsave(callback); + { + if (partial != NULL) + *cbp = partial->pt_name; + else + *cbp = vim_strsave(callback); + } else *cbp = NULL; *pp = partial; diff --git a/src/version.c b/src/version.c index 745bfd223..cd8019740 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2045, +/**/ 2044, /**/ 2043, |