From fd94e6313b3e7314561cbe90b4cacd44d1088c8f Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 12 Dec 2016 15:05:58 -0500 Subject: 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 --- src/nvim/quickfix.c | 5 ++--- src/nvim/version.c | 2 +- 2 files changed, 3 insertions(+), 4 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); diff --git a/src/nvim/version.c b/src/nvim/version.c index 3efc161b05..576843e61d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -474,7 +474,7 @@ static int included_patches[] = { // 1969 NA // 1968, 1967, - // 1966, + 1966, // 1965 NA 1964, // 1963 NA -- cgit