diff options
author | James McCoy <jamessan@jamessan.com> | 2016-12-12 15:05:58 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-12-27 14:10:27 -0500 |
commit | fd94e6313b3e7314561cbe90b4cacd44d1088c8f (patch) | |
tree | 79d512b6ec2966b87b3fd27d4a3ae6d03bb74726 /src/nvim/quickfix.c | |
parent | 82f54c0a5eea91dcfd7a509588b4ac37f7e55b57 (diff) | |
download | rneovim-fd94e6313b3e7314561cbe90b4cacd44d1088c8f.tar.gz rneovim-fd94e6313b3e7314561cbe90b4cacd44d1088c8f.tar.bz2 rneovim-fd94e6313b3e7314561cbe90b4cacd44d1088c8f.zip |
vim-patch:7.4.1966
Problem: Coverity reports a resource leak.
Solution: Close "fd" also when bailing out.
https://github.com/vim/vim/commit/bcf7772a23624edc0942120e564f6b4ac95604ad
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 1499c3e12f..39f95d19ae 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -941,7 +941,7 @@ restofline: } /* return number of matches */ retval = qi->qf_lists[qi->qf_curlist].qf_count; - goto qf_init_ok; + goto qf_init_end; } EMSG(_(e_readerrf)); error2: @@ -949,13 +949,12 @@ error2: qi->qf_listcount--; if (qi->qf_curlist > 0) --qi->qf_curlist; -qf_init_ok: +qf_init_end: if (fd != NULL) fclose(fd); free_efm_list(&fmt_first); qf_clean_dir_stack(&dir_stack); qf_clean_dir_stack(&file_stack); -qf_init_end: xfree(namebuf); xfree(errmsg); xfree(pattern); |