mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.4624: old Coverity warning for resource leak
Problem: Old Coverity warning for resource leak. Solution: Close the file if memory allocation fails.
This commit is contained in:
parent
03a297c63f
commit
5d46dcfeed
@ -1662,7 +1662,11 @@ diff_read(
|
||||
{
|
||||
hunk = ALLOC_ONE(diffhunk_T);
|
||||
if (hunk == NULL)
|
||||
{
|
||||
if (fd != NULL)
|
||||
fclose(fd);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (;;)
|
||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4624,
|
||||
/**/
|
||||
4623,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user