1
0
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:
Bram Moolenaar
2016-07-22 22:12:38 +02:00
parent df48fb456f
commit 2e45d21c81
2 changed files with 5 additions and 0 deletions

View File

@@ -6197,7 +6197,10 @@ gui_get_color_cmn(char_u *name)
char_u *s = vim_strsave((char_u *)line + pos);
if (s == NULL)
{
fclose(fd);
return INVALCOLOR;
}
colornames_table[size].color_name = s;
colornames_table[size].color = (guicolor_T)RGB(r, g, b);
}

View File

@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2091,
/**/
2090,
/**/