1
0
forked from aniani/vim

patch 8.0.0356: leaking memory when setting 'ttytype'

Problem:    Leaking memory when setting 'ttytype'.
Solution:   Get free_oldval from the right option entry.
This commit is contained in:
Bram Moolenaar
2017-02-23 17:18:37 +01:00
parent 187a4f2814
commit 354796c19a
2 changed files with 3 additions and 0 deletions

View File

@@ -5936,6 +5936,7 @@ did_set_string_option(
/* Both 'term' and 'ttytype' point to T_NAME, only set the
* P_ALLOCED flag on 'term'. */
opt_idx = findoption((char_u *)"term");
free_oldval = (options[opt_idx].flags & P_ALLOCED);
}
}