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 */
|
||||
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);
|
||||
|
Reference in New Issue
Block a user