From: Bram Moolenaar Date: Sat, 30 Jul 2016 19:48:59 +0000 (+0200) Subject: patch 7.4.2128 X-Git-Tag: v7.4.2128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e2258297bb31720bfbeb234f2dae4d1b3b04fbd;p=vim 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 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, /**/