Skip to content

Commit

Permalink
patch 8.2.2907: memory leak when running out of memory
Browse files Browse the repository at this point in the history
Problem:    Memory leak when running out of memory.
Solution:   Free the allocated memory. (Dominique Pellé, closes #8284)
  • Loading branch information
dpelle authored and brammool committed May 29, 2021
1 parent a5787c3 commit 28cf44f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/term.c
Expand Up @@ -4248,6 +4248,7 @@ add_termcode(char_u *name, char_u *string, int flags)
if (new_tc == NULL)
{
tc_max_len -= 20;
vim_free(s);
return;
}
for (i = 0; i < tc_len; ++i)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2907,
/**/
2906,
/**/
Expand Down

0 comments on commit 28cf44f

Please sign in to comment.