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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221017190058.2DFF01C0363%40moolenaar.net.

Raspunde prin e-mail lui