Skip to content

Commit 28cf44f

Browse files
dpellebrammool
authored andcommitted
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)
1 parent a5787c3 commit 28cf44f

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/term.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4248,6 +4248,7 @@ add_termcode(char_u *name, char_u *string, int flags)
42484248
if (new_tc == NULL)
42494249
{
42504250
tc_max_len -= 20;
4251+
vim_free(s);
42514252
return;
42524253
}
42534254
for (i = 0; i < tc_len; ++i)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2907,
753755
/**/
754756
2906,
755757
/**/

0 commit comments

Comments
 (0)