From c2d1684e05f62e66e4820c6f86b80f5c9187365f Mon Sep 17 00:00:00 2001 From: Nick Neisen Date: Wed, 16 May 2018 19:18:16 -0600 Subject: coverity/13702: open_spellbuf: handle failed ml_open() --- src/nvim/spell.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit