aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-01-21 21:57:44 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-01-21 21:57:44 +0100
commitc86caf7e41c77f85861fc92e1ef1462508d74b24 (patch)
tree69f32f7c87b6ef4791bf330552c5374508f1909c
parent497db001dfbf5f35e32f9aceabde145a6669ce8a (diff)
downloadrneovim-c86caf7e41c77f85861fc92e1ef1462508d74b24.tar.gz
rneovim-c86caf7e41c77f85861fc92e1ef1462508d74b24.tar.bz2
rneovim-c86caf7e41c77f85861fc92e1ef1462508d74b24.zip
readfile(): Fix read-after-free.
References https://github.com/neovim/neovim/pull/5956#pullrequestreview-17812620 Helped-by: oni-link <knil.ino@gmail.com>
-rw-r--r--src/nvim/fileio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 13329d771b..12206c1680 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -1882,6 +1882,7 @@ failed:
xfree(keep_msg);
keep_msg = NULL;
+ p = NULL;
msg_scrolled_ign = TRUE;
if (!read_stdin && !read_buffer) {