To: vim_dev@googlegroups.com Subject: Patch 8.2.2712 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2712 Problem: Memory leak when adding to a blob fails. Solution: Clear the second typval before returning. Files: src/eval.c *** ../vim-8.2.2711/src/eval.c 2021-04-04 20:49:46.626430253 +0200 --- src/eval.c 2021-04-04 21:48:49.921257681 +0200 *************** *** 3008,3017 **** n1 = tv_get_number_chk(rettv, &error); if (error) { ! // This can only happen for "list + non-list". For ! // "non-list + ..." or "something - ...", we returned ! // before evaluating the 2nd operand. clear_tv(rettv); return FAIL; } #ifdef FEAT_FLOAT --- 3008,3019 ---- n1 = tv_get_number_chk(rettv, &error); if (error) { ! // This can only happen for "list + non-list" or ! // "blob + non-blob". For "non-list + ..." or ! // "something - ...", we returned before evaluating the ! // 2nd operand. clear_tv(rettv); + clear_tv(&var2); return FAIL; } #ifdef FEAT_FLOAT *** ../vim-8.2.2711/src/version.c 2021-04-04 21:26:00.948568645 +0200 --- src/version.c 2021-04-04 21:49:05.065219599 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2712, /**/ -- Over the years, I've developed my sense of deja vu so acutely that now I can remember things that *have* happened before ... /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///