0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 7.4.972

Problem:    Memory leak when there is an error in setting an option.
Solution:   Free the saved value (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2015-12-13 15:08:56 +01:00
parent 099fdde0f0
commit a988496706
2 changed files with 7 additions and 0 deletions

View File

@@ -4970,7 +4970,12 @@ do_set(arg, opt_flags)
/* If error detected, print the error message. */
if (errmsg != NULL)
{
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
vim_free(saved_origval);
#endif
goto skip;
}
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
if (saved_origval != NULL)
{

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
972,
/**/
971,
/**/