summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-30 21:48:59 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-30 21:48:59 +0200
commit1e2258297bb31720bfbeb234f2dae4d1b3b04fbd (patch)
tree4cb2b97e1a8e8a693ed7de8f4758faf9adf7dd51
parent3bcfca3ab4db415d0e750e00204dd25a91fcee77 (diff)
patch 7.4.2128v7.4.2128
Problem: Memory leak when saving for undo fails. Solution: Free allocated memory. (Hirohito Higashi)
-rw-r--r--src/ex_cmds.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 860d3dc984..e40e435907 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 513712198a..05df68e581 100644
--- 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,