diff src/quickfix.c @ 10379:73e2a7abe2a3 v8.0.0084

commit https://github.com/vim/vim/commit/7618e00d3b8bfe064cfc524640d754607361f9df Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 13 15:09:26 2016 +0100 patch 8.0.0084 Problem: Using freed memory when adding to a quickfix list. (Domenique Pelle) Solution: Clear the directory name.
author Christian Brabandt <cb@256bit.org>
date Sun, 13 Nov 2016 15:15:03 +0100
parents 4e5b307638cb
children e71d3bdf3bc3
line wrap: on
line diff
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -1617,7 +1617,7 @@ static char_u *qf_last_bufname = NULL;
 static bufref_T  qf_last_bufref = {NULL, 0};
 
 /*
- * Get buffer number for file "directory.fname".
+ * Get buffer number for file "directory/fname".
  * Also sets the b_has_qf_entry flag.
  */
     static int
@@ -2711,7 +2711,9 @@ 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;
 }
 
 /*