comparison src/option.c @ 10934:32b299ae6752 v8.0.0356

patch 8.0.0356: leaking memory when setting 'ttytype' commit https://github.com/vim/vim/commit/354796c19a0a4a048017059a0281938cc0b8f09a Author: Bram Moolenaar <Bram@vim.org> 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.
author Christian Brabandt <cb@256bit.org>
date Thu, 23 Feb 2017 17:30:05 +0100
parents 7fc1df5536c9
children d7b78cbf85e4
comparison
equal deleted inserted replaced
10933:54b0c4aecfa7 10934:32b299ae6752
5934 redraw_later_clear(); 5934 redraw_later_clear();
5935 5935
5936 /* Both 'term' and 'ttytype' point to T_NAME, only set the 5936 /* Both 'term' and 'ttytype' point to T_NAME, only set the
5937 * P_ALLOCED flag on 'term'. */ 5937 * P_ALLOCED flag on 'term'. */
5938 opt_idx = findoption((char_u *)"term"); 5938 opt_idx = findoption((char_u *)"term");
5939 free_oldval = (options[opt_idx].flags & P_ALLOCED);
5939 } 5940 }
5940 } 5941 }
5941 5942
5942 /* 'backupcopy' */ 5943 /* 'backupcopy' */
5943 else if (gvarp == &p_bkc) 5944 else if (gvarp == &p_bkc)