commit | 1e2258297bb31720bfbeb234f2dae4d1b3b04fbd | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sat Jul 30 21:48:59 2016 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Sat Jul 30 21:48:59 2016 +0200 |
tree | 4cb2b97e1a8e8a693ed7de8f4758faf9adf7dd51 | |
parent | 3bcfca3ab4db415d0e750e00204dd25a91fcee77 [diff] [blame] |
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 860d3dc..e40e435 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c
@@ -4091,7 +4091,10 @@ 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);