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:
@@ -4970,7 +4970,12 @@ do_set(arg, opt_flags)
|
|||||||
|
|
||||||
/* If error detected, print the error message. */
|
/* If error detected, print the error message. */
|
||||||
if (errmsg != NULL)
|
if (errmsg != NULL)
|
||||||
|
{
|
||||||
|
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||||
|
vim_free(saved_origval);
|
||||||
|
#endif
|
||||||
goto skip;
|
goto skip;
|
||||||
|
}
|
||||||
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||||
if (saved_origval != NULL)
|
if (saved_origval != NULL)
|
||||||
{
|
{
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
972,
|
||||||
/**/
|
/**/
|
||||||
971,
|
971,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user