]> granicus.if.org Git - vim/commitdiff
patch 7.4.1966 v7.4.1966
authorBram Moolenaar <Bram@vim.org>
Tue, 28 Jun 2016 19:11:32 +0000 (21:11 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 28 Jun 2016 19:11:32 +0000 (21:11 +0200)
Problem:    Coverity reports a resource leak.
Solution:   Close "fd" also when bailing out.

src/quickfix.c
src/version.c

index b791d6042405105b5a14064b0f6906a93791931a..366e4bd9223bf01ebcab4a36bdecc856f2d95352 100644 (file)
@@ -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);
index 85019976bb1929e88ccd2d41ea60560a0de97085..4d39ea374cb52a99b9104ba2d8a0ca659854c99e 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1966,
 /**/
     1965,
 /**/