# HG changeset patch # User Christian Brabandt # Date 1458394206 -3600 # Node ID 99aed8c33bbf5b3da8deb8e349debe54870725ee # Parent 71b70b86bd326625c23f9553eff93918d11bb40c commit https://github.com/vim/vim/commit/9f6154f26ef17b0a7efd2fcdd79cabfe510f28b4 Author: Bram Moolenaar Date: Sat Mar 19 14:22:11 2016 +0100 patch 7.4.1597 Problem: Memory leak when out of memory. (Coverity) Solution: Free the name. diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -11904,7 +11904,9 @@ f_function(typval_T *argvars, typval_T * partial_T *pt = (partial_T *)alloc_clear(sizeof(partial_T)); /* result is a VAR_PARTIAL */ - if (pt != NULL) + if (pt == NULL) + vim_free(name); + else { if (arg_idx > 0 || (arg_pt != NULL && arg_pt->pt_argc > 0)) { diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1597, +/**/ 1596, /**/ 1595,