comparison 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
comparison
equal deleted inserted replaced
10378:e0c401329563 10379:73e2a7abe2a3
1615 */ 1615 */
1616 static char_u *qf_last_bufname = NULL; 1616 static char_u *qf_last_bufname = NULL;
1617 static bufref_T qf_last_bufref = {NULL, 0}; 1617 static bufref_T qf_last_bufref = {NULL, 0};
1618 1618
1619 /* 1619 /*
1620 * Get buffer number for file "directory.fname". 1620 * Get buffer number for file "directory/fname".
1621 * Also sets the b_has_qf_entry flag. 1621 * Also sets the b_has_qf_entry flag.
1622 */ 1622 */
1623 static int 1623 static int
1624 qf_get_fnum(qf_info_T *qi, char_u *directory, char_u *fname) 1624 qf_get_fnum(qf_info_T *qi, char_u *directory, char_u *fname)
1625 { 1625 {
2709 vim_free(qi->qf_lists[idx].qf_title); 2709 vim_free(qi->qf_lists[idx].qf_title);
2710 qi->qf_lists[idx].qf_title = NULL; 2710 qi->qf_lists[idx].qf_title = NULL;
2711 qi->qf_lists[idx].qf_index = 0; 2711 qi->qf_lists[idx].qf_index = 0;
2712 2712
2713 qf_clean_dir_stack(&qi->qf_dir_stack); 2713 qf_clean_dir_stack(&qi->qf_dir_stack);
2714 qi->qf_directory = NULL;
2714 qf_clean_dir_stack(&qi->qf_file_stack); 2715 qf_clean_dir_stack(&qi->qf_file_stack);
2716 qi->qf_currfile = NULL;
2715 } 2717 }
2716 2718
2717 /* 2719 /*
2718 * qf_mark_adjust: adjust marks 2720 * qf_mark_adjust: adjust marks
2719 */ 2721 */