:recover : Fix crash on non-existent *.swp #9504

Reverts d2944e6a29. mf_open() _can_ fail if the file does not exist.

closes #9503
closes #9504
This commit is contained in:
raffitz
2019-01-14 14:09:47 +00:00
committed by Justin M. Keyes
parent 387ab4f706
commit 95fa71c6d2
4 changed files with 23 additions and 11 deletions

View File

@@ -76,7 +76,8 @@
/// @param flags Flags for open() call.
///
/// @return The open memory file.
/// @return - The open memory file, on success.
/// - NULL, on failure (e.g. file does not exist).
memfile_T *mf_open(char_u *fname, int flags)
{
memfile_T *mfp = xmalloc(sizeof(memfile_T));