Mercurial > vim
comparison src/quickfix.c @ 11360:83303ad9f1ff v8.0.0565
patch 8.0.0565: using freed memory in :caddbuf
commit https://github.com/vim/vim/commit/31bdd13c335533c749993b57dcd980a87373139e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 15 15:22:52 2017 +0200
patch 8.0.0565: using freed memory in :caddbuf
Problem: Using freed memory in :caddbuf after clearing quickfix list.
(Dominique Pelle)
Solution: Set qf_last to NULL.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 15 Apr 2017 15:30:03 +0200 |
parents | cc8ece2aa389 |
children | 2ed7a34ecc54 |
comparison
equal
deleted
inserted
replaced
11359:0fc4e555506d | 11360:83303ad9f1ff |
---|---|
2748 --qi->qf_lists[idx].qf_count; | 2748 --qi->qf_lists[idx].qf_count; |
2749 } | 2749 } |
2750 vim_free(qi->qf_lists[idx].qf_title); | 2750 vim_free(qi->qf_lists[idx].qf_title); |
2751 qi->qf_lists[idx].qf_title = NULL; | 2751 qi->qf_lists[idx].qf_title = NULL; |
2752 qi->qf_lists[idx].qf_index = 0; | 2752 qi->qf_lists[idx].qf_index = 0; |
2753 qi->qf_lists[idx].qf_last = NULL; | |
2753 | 2754 |
2754 qf_clean_dir_stack(&qi->qf_dir_stack); | 2755 qf_clean_dir_stack(&qi->qf_dir_stack); |
2755 qi->qf_directory = NULL; | 2756 qi->qf_directory = NULL; |
2756 qf_clean_dir_stack(&qi->qf_file_stack); | 2757 qf_clean_dir_stack(&qi->qf_file_stack); |
2757 qi->qf_currfile = NULL; | 2758 qi->qf_currfile = NULL; |