diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-02-23 17:18:37 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-02-23 17:18:37 +0100 |
commit | 354796c19a0a4a048017059a0281938cc0b8f09a (patch) | |
tree | 6c6aae192ab66cce8641685f8d4a86d03c76612e /src | |
parent | 187a4f28140f10ff833862be7e3ef823d317e1c7 (diff) | |
download | vim-git-354796c19a0a4a048017059a0281938cc0b8f09a.tar.gz |
patch 8.0.0356: leaking memory when setting 'ttytype'v8.0.0356
Problem: Leaking memory when setting 'ttytype'.
Solution: Get free_oldval from the right option entry.
Diffstat (limited to 'src')
-rw-r--r-- | src/option.c | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c index 48a8048cb..4ba436341 100644 --- a/src/option.c +++ b/src/option.c @@ -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); } } diff --git a/src/version.c b/src/version.c index 64e11118b..94a325beb 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 356, +/**/ 355, /**/ 354, |