# HG changeset patch # User Bram Moolenaar # Date 1622321102 -7200 # Node ID e97a14604f652870d2bfc43958734a2986fa4ed1 # Parent 0787d011aa20a258c9a16accf96992844c8a4b50 patch 8.2.2907: memory leak when running out of memory Commit: https://github.com/vim/vim/commit/28cf44f761a7bf261bcd0760a1c5f61070f69595 Author: Dominique Pelle Date: Sat May 29 22:34:19 2021 +0200 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 https://github.com/vim/vim/issues/8284) diff --git a/src/term.c b/src/term.c --- a/src/term.c +++ b/src/term.c @@ -4248,6 +4248,7 @@ add_termcode(char_u *name, char_u *strin if (new_tc == NULL) { tc_max_len -= 20; + vim_free(s); return; } for (i = 0; i < tc_len; ++i) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2907, +/**/ 2906, /**/ 2905,