To: vim_dev@googlegroups.com Subject: Patch 7.4.1832 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1832 Problem: Memory leak in debug commands. Solution: Free memory before overwriting the pointer. (hint by Justin Keyes) Files: src/ex_cmds2.c *** ../vim-7.4.1831/src/ex_cmds2.c 2016-04-23 14:33:11.333175109 +0200 --- src/ex_cmds2.c 2016-05-17 17:35:33.317984848 +0200 *************** *** 164,169 **** --- 164,170 ---- ignore_script = TRUE; } + vim_free(cmdline); cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL); if (typeahead_saved) *************** *** 306,313 **** (void)do_cmdline(cmdline, getexline, NULL, DOCMD_VERBOSE|DOCMD_EXCRESET); debug_break_level = n; - - vim_free(cmdline); } lines_left = Rows - 1; } --- 307,312 ---- *** ../vim-7.4.1831/src/version.c 2016-05-15 18:00:11.514811022 +0200 --- src/version.c 2016-05-17 17:41:32.597997432 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1832, /**/ -- ARTHUR: ... and I am your king .... OLD WOMAN: Ooooh! I didn't know we had a king. I thought we were an autonomous collective ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///