forked from aniani/vim
patch 8.2.2907: memory leak when running out of memory
Problem: Memory leak when running out of memory. Solution: Free the allocated memory. (Dominique Pellé, closes #8284)
This commit is contained in:
committed by
Bram Moolenaar
parent
a5787c3742
commit
28cf44f761
@@ -4248,6 +4248,7 @@ add_termcode(char_u *name, char_u *string, int flags)
|
|||||||
if (new_tc == NULL)
|
if (new_tc == NULL)
|
||||||
{
|
{
|
||||||
tc_max_len -= 20;
|
tc_max_len -= 20;
|
||||||
|
vim_free(s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (i = 0; i < tc_len; ++i)
|
for (i = 0; i < tc_len; ++i)
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
2907,
|
||||||
/**/
|
/**/
|
||||||
2906,
|
2906,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user