mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 15:28:17 +00:00
vim-patch:7.4.1966
Problem: Coverity reports a resource leak.
Solution: Close "fd" also when bailing out.
bcf7772a23
This commit is contained in:
@@ -941,7 +941,7 @@ restofline:
|
|||||||
}
|
}
|
||||||
/* return number of matches */
|
/* return number of matches */
|
||||||
retval = qi->qf_lists[qi->qf_curlist].qf_count;
|
retval = qi->qf_lists[qi->qf_curlist].qf_count;
|
||||||
goto qf_init_ok;
|
goto qf_init_end;
|
||||||
}
|
}
|
||||||
EMSG(_(e_readerrf));
|
EMSG(_(e_readerrf));
|
||||||
error2:
|
error2:
|
||||||
@@ -949,13 +949,12 @@ error2:
|
|||||||
qi->qf_listcount--;
|
qi->qf_listcount--;
|
||||||
if (qi->qf_curlist > 0)
|
if (qi->qf_curlist > 0)
|
||||||
--qi->qf_curlist;
|
--qi->qf_curlist;
|
||||||
qf_init_ok:
|
qf_init_end:
|
||||||
if (fd != NULL)
|
if (fd != NULL)
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
free_efm_list(&fmt_first);
|
free_efm_list(&fmt_first);
|
||||||
qf_clean_dir_stack(&dir_stack);
|
qf_clean_dir_stack(&dir_stack);
|
||||||
qf_clean_dir_stack(&file_stack);
|
qf_clean_dir_stack(&file_stack);
|
||||||
qf_init_end:
|
|
||||||
xfree(namebuf);
|
xfree(namebuf);
|
||||||
xfree(errmsg);
|
xfree(errmsg);
|
||||||
xfree(pattern);
|
xfree(pattern);
|
||||||
|
@@ -474,7 +474,7 @@ static int included_patches[] = {
|
|||||||
// 1969 NA
|
// 1969 NA
|
||||||
// 1968,
|
// 1968,
|
||||||
1967,
|
1967,
|
||||||
// 1966,
|
1966,
|
||||||
// 1965 NA
|
// 1965 NA
|
||||||
1964,
|
1964,
|
||||||
// 1963 NA
|
// 1963 NA
|
||||||
|
Reference in New Issue
Block a user