mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -4091,7 +4091,10 @@ do_ecmd(
|
|||||||
u_sync(FALSE);
|
u_sync(FALSE);
|
||||||
if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, TRUE)
|
if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, TRUE)
|
||||||
== FAIL)
|
== FAIL)
|
||||||
|
{
|
||||||
|
vim_free(new_name);
|
||||||
goto theend;
|
goto theend;
|
||||||
|
}
|
||||||
u_unchanged(curbuf);
|
u_unchanged(curbuf);
|
||||||
buf_freeall(curbuf, BFA_KEEP_UNDO);
|
buf_freeall(curbuf, BFA_KEEP_UNDO);
|
||||||
|
|
||||||
|
@@ -763,6 +763,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2128,
|
||||||
/**/
|
/**/
|
||||||
2127,
|
2127,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user