mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -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,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user