To: vim_dev@googlegroups.com Subject: Patch 7.4.1867 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1867 Problem: Memory leak in test_matchstrpos. Solution: Free the string before overwriting. (Yegappan Lakshmanan) Files: src/eval.c *** ../vim-7.4.1866/src/eval.c 2016-06-01 22:21:02.177460750 +0200 --- src/eval.c 2016-06-01 22:34:11.105449898 +0200 *************** *** 15773,15778 **** --- 15773,15779 ---- listitem_T *li3 = li2->li_next; listitem_T *li4 = li3->li_next; + vim_free(li1->li_tv.vval.v_string); li1->li_tv.vval.v_string = vim_strnsave(regmatch.startp[0], (int)(regmatch.endp[0] - regmatch.startp[0])); li3->li_tv.vval.v_number = *** ../vim-7.4.1866/src/version.c 2016-06-01 22:21:02.177460750 +0200 --- src/version.c 2016-06-01 22:32:44.037451096 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1867, /**/ -- Give a man a computer program and you give him a headache, but teach him to program computers and you give him the power to create headaches for others for the rest of his life... R. B. Forest /// 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 ///