diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-04-15 15:22:52 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-04-15 15:22:52 +0200 |
commit | 31bdd13c335533c749993b57dcd980a87373139e (patch) | |
tree | 6b161b9c78d5a63551b97dad4ab314f2c4b32dd1 | |
parent | 39170e2d9761345df4be67d4d3928ac1094b9adf (diff) |
patch 8.0.0565: using freed memory in :caddbufv8.0.0565
Problem: Using freed memory in :caddbuf after clearing quickfix list.
(Dominique Pelle)
Solution: Set qf_last to NULL.
-rw-r--r-- | src/quickfix.c | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index 58fcd11011..d2921b21c6 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2750,6 +2750,7 @@ qf_free(qf_info_T *qi, int idx) vim_free(qi->qf_lists[idx].qf_title); qi->qf_lists[idx].qf_title = NULL; qi->qf_lists[idx].qf_index = 0; + qi->qf_lists[idx].qf_last = NULL; qf_clean_dir_stack(&qi->qf_dir_stack); qi->qf_directory = NULL; diff --git a/src/version.c b/src/version.c index 048953d38f..a68b999d66 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 565, +/**/ 564, /**/ 563, |