changeset 24737:e97a14604f65 v8.2.2907

patch 8.2.2907: memory leak when running out of memory Commit: https://github.com/vim/vim/commit/28cf44f761a7bf261bcd0760a1c5f61070f69595 Author: Dominique Pelle <dominique.pelle@gmail.com> 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 29 May 2021 22:45:02 +0200
parents 0787d011aa20
children cd3c2a881ff2
files src/term.c src/version.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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,