Fixes for coverity warnings.
diff --git a/src/option.c b/src/option.c
index 2c5e88b..06e569c 100644
--- a/src/option.c
+++ b/src/option.c
@@ -3212,6 +3212,8 @@
options[opt_idx].def_val[VI_DEFAULT] = buf;
options[opt_idx].flags |= P_DEF_ALLOCED;
}
+ else
+ vim_free(buf); /* cannot happen */
}
if (mustfree)
vim_free(cdpath);
@@ -4262,6 +4264,7 @@
* 'foldmethod' becomes "marker" instead of "diff" and that
* "wrap" gets set. */
if (curwin->w_p_diff
+ && opt_idx >= 0 /* shut up coverity warning */
&& (options[opt_idx].indir == PV_FDM
|| options[opt_idx].indir == PV_WRAP))
goto skip;