patch 7.4.972
Problem: Memory leak when there is an error in setting an option.
Solution: Free the saved value (Christian Brabandt)
diff --git a/src/option.c b/src/option.c
index 3f98f47..0c38de6 100644
--- a/src/option.c
+++ b/src/option.c
@@ -4970,7 +4970,12 @@
/* 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)
{