To: vim_dev@googlegroups.com Subject: Patch 7.4.939 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.939 Problem: Memory leak when encountering a syntax error. Solution: Free the memory. (Dominique Pelle) Files: src/ex_docmd.c *** ../vim-7.4.938/src/ex_docmd.c 2015-10-13 19:18:00.252374217 +0200 --- src/ex_docmd.c 2015-11-24 17:18:47.574309545 +0100 *************** *** 12117,12122 **** --- 12117,12123 ---- if (*p == NUL) { /* There must be two arguments. */ + vim_free(g); EMSG2(_(e_invarg2), eap->arg); return; } *************** *** 12125,12135 **** --- 12126,12138 ---- { if (*end != NUL && !ends_excmd(*skipwhite(end + 1))) { + vim_free(g); eap->errmsg = e_trailing; return; } if (*end != *p) { + vim_free(g); EMSG2(_(e_invarg2), p); return; } *** ../vim-7.4.938/src/version.c 2015-11-24 15:38:39.691489300 +0100 --- src/version.c 2015-11-24 17:18:04.314774844 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 939, /**/ -- hundred-and-one symptoms of being an internet addict: 133. You communicate with people on other continents more than you do with your own neighbors. /// 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 ///