To: vim_dev@googlegroups.com Subject: Patch 8.1.0148 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.0148 Problem: Memory leak when using :tcl expr command. Solution: Free the result of expression evaluation. (Dominique Pelle, closes #3150) Files: src/if_tcl.c *** ../vim-8.1.0147/src/if_tcl.c 2017-09-16 19:58:18.000000000 +0200 --- src/if_tcl.c 2018-07-04 22:09:29.189322096 +0200 *************** *** 1385,1391 **** --- 1385,1394 ---- if (str == NULL) Tcl_SetResult(interp, _("invalid expression"), TCL_STATIC); else + { Tcl_SetResult(interp, str, TCL_VOLATILE); + vim_free(str); + } err = vimerror(interp); #else Tcl_SetResult(interp, _("expressions disabled at compile time"), TCL_STATIC); *** ../vim-8.1.0147/src/version.c 2018-07-04 22:03:22.110919832 +0200 --- src/version.c 2018-07-04 22:08:39.721556114 +0200 *************** *** 791,792 **** --- 791,794 ---- { /* Add new patch number below this line */ + /**/ + 148, /**/ -- Rule #1: Don't give somebody a tool that he's going to hurt himself with. /// 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 ///