To: vim_dev@googlegroups.com Subject: Patch 7.4.1597 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1597 Problem: Memory leak when out of memory. (Coverity) Solution: Free the name. Files: src/eval.c *** ../vim-7.4.1596/src/eval.c 2016-03-18 19:39:20.932316581 +0100 --- src/eval.c 2016-03-19 14:19:51.565631907 +0100 *************** *** 11904,11910 **** partial_T *pt = (partial_T *)alloc_clear(sizeof(partial_T)); /* result is a VAR_PARTIAL */ ! if (pt != NULL) { if (arg_idx > 0 || (arg_pt != NULL && arg_pt->pt_argc > 0)) { --- 11904,11912 ---- partial_T *pt = (partial_T *)alloc_clear(sizeof(partial_T)); /* result is a VAR_PARTIAL */ ! if (pt == NULL) ! vim_free(name); ! else { if (arg_idx > 0 || (arg_pt != NULL && arg_pt->pt_argc > 0)) { *** ../vim-7.4.1596/src/version.c 2016-03-19 14:16:34.611690741 +0100 --- src/version.c 2016-03-19 14:20:52.416995860 +0100 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1597, /**/ -- If your nose runs, and your feet smell, you might be upside down. /// 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 ///