• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Révision672ee41a6a3bf2733e99a7cc48aa268c697bfac1 (tree)
l'heure2020-10-18 06:00:03
AuteurBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Message de Log

patch 8.2.1860: Vim9: memory leak when throwing empty string

Commit: https://github.com/vim/vim/commit/335e67132265b068f39f3671e5dff2aecd1bf403
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 17 22:58:21 2020 +0200

patch 8.2.1860: Vim9: memory leak when throwing empty string
Problem: Vim9: memory leak when throwing empty string.
Solution: Free the empty string.

Change Summary

Modification

diff -r cd4e2b566907 -r 672ee41a6a3b src/version.c
--- a/src/version.c Sat Oct 17 22:15:04 2020 +0200
+++ b/src/version.c Sat Oct 17 23:00:03 2020 +0200
@@ -751,6 +751,8 @@
751751 static int included_patches[] =
752752 { /* Add new patch number below this line */
753753 /**/
754+ 1860,
755+/**/
754756 1859,
755757 /**/
756758 1858,
diff -r cd4e2b566907 -r 672ee41a6a3b src/vim9execute.c
--- a/src/vim9execute.c Sat Oct 17 22:15:04 2020 +0200
+++ b/src/vim9execute.c Sat Oct 17 23:00:03 2020 +0200
@@ -2094,6 +2094,7 @@
20942094 if (tv->vval.v_string == NULL
20952095 || *skipwhite(tv->vval.v_string) == NUL)
20962096 {
2097+ vim_free(tv->vval.v_string);
20972098 emsg(_(e_throw_with_empty_string));
20982099 goto failed;
20992100 }
Afficher sur ancien navigateur de dépôt.