diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2017-07-16 17:39:53 +0200 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2017-07-16 17:48:50 +0200 |
commit | e29ec131d67f3410dba85ab13ba4c617e5768269 (patch) | |
tree | 2f7881384c2ba2cb28006eb3fc5014f89fb259ea /src/nvim/quickfix.c | |
parent | 875c356a83b07573b87b2995478fc3b0703bc023 (diff) | |
download | rneovim-e29ec131d67f3410dba85ab13ba4c617e5768269.tar.gz rneovim-e29ec131d67f3410dba85ab13ba4c617e5768269.tar.bz2 rneovim-e29ec131d67f3410dba85ab13ba4c617e5768269.zip |
vim-patch:8.0.0084
Problem: Using freed memory when adding to a quickfix list. (Domenique
Pelle)
Solution: Clear the directory name.
https://github.com/vim/vim/commit/7618e00d3b8bfe064cfc524640d754607361f9df
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 44469a77df..f17075f0c4 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -1417,7 +1417,7 @@ void copy_loclist(win_T *from, win_T *to) to->w_llist->qf_curlist = qi->qf_curlist; /* current list */ } -// Get buffer number for file "directory.fname". +// Get buffer number for file "directory/fname". // Also sets the b_has_qf_entry flag. static int qf_get_fnum(qf_info_T *qi, char_u *directory, char_u *fname) { @@ -2371,7 +2371,9 @@ static void qf_free(qf_info_T *qi, int idx) qi->qf_lists[idx].qf_index = 0; qf_clean_dir_stack(&qi->qf_dir_stack); + qi->qf_directory = NULL; qf_clean_dir_stack(&qi->qf_file_stack); + qi->qf_currfile = NULL; } /* |