From 1e2258297bb31720bfbeb234f2dae4d1b3b04fbd Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 30 Jul 2016 21:48:59 +0200 Subject: [PATCH] patch 7.4.2128 Problem: Memory leak when saving for undo fails. Solution: Free allocated memory. (Hirohito Higashi) --- src/ex_cmds.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 860d3dc98..e40e43590 100644 --- 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 index 513712198..05df68e58 100644 --- a/src/version.c +++ b/src/version.c @@ -763,6 +763,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2128, /**/ 2127, /**/ -- 2.50.1