patch 8.1.2107: various memory leaks reported by asan
Problem: Various memory leaks reported by asan.
Solution: Free the memory. (Ozaki Kiichi, closes #5003)
diff --git a/src/option.c b/src/option.c
index 51e75c3..3d40814 100644
--- a/src/option.c
+++ b/src/option.c
@@ -686,7 +686,7 @@
&& (do_buffer || (p->indir & PV_BUF) == 0)
&& !(options[i].flags & P_NODEFAULT)
&& !optval_default(p, varp, FALSE))
- set_option_default(i, OPT_LOCAL, FALSE);
+ set_option_default(i, OPT_FREE|OPT_LOCAL, FALSE);
}
unblock_autocmds();