To: vim_dev@googlegroups.com Subject: Patch 7.4.2091 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2091 Problem: Coverity reports a resource leak when out of memory. Solution: Close the file before returning. Files: src/term.c *** ../vim-7.4.2090/src/term.c 2016-07-19 23:36:24.353635422 +0200 --- src/term.c 2016-07-22 22:11:30.437788209 +0200 *************** *** 6197,6203 **** --- 6197,6206 ---- 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); } *** ../vim-7.4.2090/src/version.c 2016-07-22 21:49:36.682031402 +0200 --- src/version.c 2016-07-22 22:12:10.893422814 +0200 *************** *** 760,761 **** --- 760,763 ---- { /* Add new patch number below this line */ + /**/ + 2091, /**/ -- We learn from our mistakes. Politicians don't make mistakes. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///