patch 7.4.2091
Problem: Coverity reports a resource leak when out of memory.
Solution: Close the file before returning.
diff --git a/src/term.c b/src/term.c
index 73f1f31..506cf3c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -6197,7 +6197,10 @@
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);
}
diff --git a/src/version.c b/src/version.c
index e42229e..f7eb5ce 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2091,
+/**/
2090,
/**/
2089,