summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-22 22:12:38 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-22 22:12:38 +0200
commit2e45d21c819272051f7ef4436f483e4b2ecfb369 (patch)
tree8b2fd3f2c356fc4ad4994cf6d3d9e22e2f68779f /src
parentdf48fb456fb6bf63d94cad9b302ff01d8ee8d311 (diff)
downloadvim-2e45d21c819272051f7ef4436f483e4b2ecfb369.zip
patch 7.4.2091
Problem: Coverity reports a resource leak when out of memory. Solution: Close the file before returning.
Diffstat (limited to 'src')
-rw-r--r--src/term.c3
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/term.c b/src/term.c
index 73f1f317b..506cf3c08 100644
--- a/src/term.c
+++ b/src/term.c
@@ -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);
}
diff --git a/src/version.c b/src/version.c
index e42229eea..f7eb5ceea 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2091,
+/**/
2090,
/**/
2089,