]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0978: leaking memory in termcodes test v8.2.0978
authorBram Moolenaar <Bram@vim.org>
Sun, 14 Jun 2020 13:35:58 +0000 (15:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 14 Jun 2020 13:35:58 +0000 (15:35 +0200)
Problem:    Leaking memory in termcodes test.
Solution:   Set t_8u with set_option_value().

src/term.c
src/version.c

index b806a8907b6f3e26546385ea0fb91abb1cd0b930..f8b56592d5c4c22dfd518488cacddaa1d6190077 100644 (file)
@@ -4690,7 +4690,7 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
        // Unless the underline RGB color is expected to work, disable "t_8u".
        // It does not work for the real Xterm, it resets the background color.
        if (term_props[TPR_UNDERLINE_RGB].tpr_status != TPR_YES && *T_8U != NUL)
-           T_8U = empty_option;
+           set_option_value((char_u *)"t_8u", 0L, (char_u *)"", 0);
 
        // Only set 'ttymouse' automatically if it was not set
        // by the user already.
index f2170eff672bad121028ac7d9b6936d2b33ef558..2c2c573d0a4d824b8d7d54568abebd28e955fa6f 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    978,
 /**/
     977,
 /**/