diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-28 21:11:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-28 21:11:32 +0200 |
commit | bcf7772a23624edc0942120e564f6b4ac95604ad (patch) | |
tree | 850be5be368a12a3a7d70c07bbfa190be6c0854b | |
parent | adb78a77ebb47627bcf73bd16ac1119d970e17c8 (diff) |
patch 7.4.1966v7.4.1966
Problem: Coverity reports a resource leak.
Solution: Close "fd" also when bailing out.
-rw-r--r-- | src/quickfix.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index b791d60424..366e4bd922 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -1101,7 +1101,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: @@ -1109,13 +1109,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: vim_free(namebuf); vim_free(errmsg); vim_free(pattern); diff --git a/src/version.c b/src/version.c index 85019976bb..4d39ea374c 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1966, +/**/ 1965, /**/ 1964, |