To: vim_dev@googlegroups.com Subject: Patch 7.4.2128 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2128 Problem: Memory leak when saving for undo fails. Solution: Free allocated memory. (Hirohito Higashi) Files: src/ex_cmds.c *** ../vim-7.4.2127/src/ex_cmds.c 2016-07-29 17:03:48.859345258 +0200 --- src/ex_cmds.c 2016-07-30 21:46:49.172724853 +0200 *************** *** 4091,4097 **** --- 4091,4100 ---- u_sync(FALSE); if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, TRUE) == FAIL) + { + vim_free(new_name); goto theend; + } u_unchanged(curbuf); buf_freeall(curbuf, BFA_KEEP_UNDO); *** ../vim-7.4.2127/src/version.c 2016-07-30 19:39:23.487649548 +0200 --- src/version.c 2016-07-30 21:47:29.184353183 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2128, /**/ -- "I know that there are people who don't love their fellow man, and I hate those people!" - Tom Lehrer /// 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 ///