# HG changeset patch # User Christian Brabandt # Date 1487867405 -3600 # Node ID 32b299ae67527a3025fde78d99a1cd71b21879ff # Parent 54b0c4aecfa7a5548e1350cbaac2e78907fe8f35 patch 8.0.0356: leaking memory when setting 'ttytype' commit https://github.com/vim/vim/commit/354796c19a0a4a048017059a0281938cc0b8f09a Author: Bram Moolenaar Date: Thu Feb 23 17:18:37 2017 +0100 patch 8.0.0356: leaking memory when setting 'ttytype' Problem: Leaking memory when setting 'ttytype'. Solution: Get free_oldval from the right option entry. diff --git a/src/option.c b/src/option.c --- 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 --- 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,