# HG changeset patch # User Christian Brabandt # Date 1468611007 -7200 # Node ID 581d5131629f3acbf9aec2c4dcb56aa7949e34b5 # Parent f4a706d113fa7291362224ee04545f6b755cf8e4 commit https://github.com/vim/vim/commit/5ef2e762844e0eb1f5b213bd58e6bc38bdb69dac Author: Bram Moolenaar Date: Fri Jul 15 21:29:35 2016 +0200 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. diff --git a/src/channel.c b/src/channel.c --- 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 --- 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,