forked from aniani/vim
patch 7.4.2091
Problem: Coverity reports a resource leak when out of memory. Solution: Close the file before returning.
This commit is contained in:
@@ -6197,7 +6197,10 @@ gui_get_color_cmn(char_u *name)
|
|||||||
char_u *s = vim_strsave((char_u *)line + pos);
|
char_u *s = vim_strsave((char_u *)line + pos);
|
||||||
|
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
|
{
|
||||||
|
fclose(fd);
|
||||||
return INVALCOLOR;
|
return INVALCOLOR;
|
||||||
|
}
|
||||||
colornames_table[size].color_name = s;
|
colornames_table[size].color_name = s;
|
||||||
colornames_table[size].color = (guicolor_T)RGB(r, g, b);
|
colornames_table[size].color = (guicolor_T)RGB(r, g, b);
|
||||||
}
|
}
|
||||||
|
@@ -758,6 +758,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2091,
|
||||||
/**/
|
/**/
|
||||||
2090,
|
2090,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user