# HG changeset patch # User Christian Brabandt # Date 1469908806 -7200 # Node ID 8c0871098dc9d0969287b4fa68c6236fb9591bd0 # Parent 6c4e32f214b0c97e8ebb620d843cd51492f2af57 commit https://github.com/vim/vim/commit/1e2258297bb31720bfbeb234f2dae4d1b3b04fbd Author: Bram Moolenaar Date: Sat Jul 30 21:48:59 2016 +0200 patch 7.4.2128 Problem: Memory leak when saving for undo fails. Solution: Free allocated memory. (Hirohito Higashi) diff --git a/src/ex_cmds.c b/src/ex_cmds.c --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4091,7 +4091,10 @@ do_ecmd( u_sync(FALSE); if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, TRUE) == FAIL) + { + vim_free(new_name); goto theend; + } u_unchanged(curbuf); buf_freeall(curbuf, BFA_KEEP_UNDO); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2128, +/**/ 2127, /**/ 2126,