readfile(): Fix read-after-free.

References https://github.com/neovim/neovim/pull/5956#pullrequestreview-17812620

Helped-by: oni-link <knil.ino@gmail.com>
This commit is contained in:
Justin M. Keyes 2017-01-21 21:57:44 +01:00
parent 497db001df
commit c86caf7e41

View File

@ -1882,6 +1882,7 @@ failed:
xfree(keep_msg); xfree(keep_msg);
keep_msg = NULL; keep_msg = NULL;
p = NULL;
msg_scrolled_ign = TRUE; msg_scrolled_ign = TRUE;
if (!read_stdin && !read_buffer) { if (!read_stdin && !read_buffer) {