Patch 9.0.0785

7 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 17, 2022, 3:01:14 PM10/17/22
to vim...@googlegroups.com

Patch 9.0.0785 (after 9.0.0783)
Problem: Memory leak with empty shell command.
Solution: Free the allocated memory when bailing out.
Files: src/ex_cmds.c


*** ../vim-9.0.0784/src/ex_cmds.c 2022-10-17 18:00:13.492712191 +0100
--- src/ex_cmds.c 2022-10-17 19:57:04.404795072 +0100
***************
*** 960,966 ****
--- 960,969 ----
// Don't do anything if there is no command as there isn't really anything
// useful in running "sh -c ''". Avoids changing "prevcmd".
if (STRLEN(newcmd) == 0)
+ {
+ vim_free(newcmd);
return;
+ }

vim_free(prevcmd);
prevcmd = newcmd;
*** ../vim-9.0.0784/src/version.c 2022-10-17 18:54:41.680610638 +0100
--- src/version.c 2022-10-17 19:59:19.632764725 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 785,
/**/

--
A special cleaning ordinance bans housewives from hiding dirt and dust under a
rug in a dwelling.
[real standing law in Pennsylvania, United States of America]

/// Bram Moolenaar -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages