0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.2128

Problem:    Memory leak when saving for undo fails.
Solution:   Free allocated memory. (Hirohito Higashi)
This commit is contained in:
Bram Moolenaar
2016-07-30 21:48:59 +02:00
parent 3bcfca3ab4
commit 1e2258297b
2 changed files with 5 additions and 0 deletions

View File

@@ -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);

View File

@@ -763,6 +763,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2128,
/**/
2127,
/**/