aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Neisen <nwneisen@gmail.com>2018-05-16 19:18:16 -0600
committerJustin M. Keyes <justinkz@gmail.com>2018-05-17 09:03:13 +0200
commitc2d1684e05f62e66e4820c6f86b80f5c9187365f (patch)
tree01371732fea57ccdfebdbf8d89eab336e0294d26
parent189a5f2b959b568ce598c4bf6345c1ec74f9d470 (diff)
downloadrneovim-c2d1684e05f62e66e4820c6f86b80f5c9187365f.tar.gz
rneovim-c2d1684e05f62e66e4820c6f86b80f5c9187365f.tar.bz2
rneovim-c2d1684e05f62e66e4820c6f86b80f5c9187365f.zip
coverity/13702: open_spellbuf: handle failed ml_open()
-rw-r--r--src/nvim/spell.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index 84aeeda2bf..22390557b6 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -2487,7 +2487,9 @@ buf_T *open_spellbuf(void)
buf->b_spell = true;
buf->b_p_swf = true; // may create a swap file
- ml_open(buf);
+ if (ml_open(buf) == FAIL) {
+ ELOG("Error opening a new memline");
+ }
ml_open_file(buf); // create swap file now
return buf;