mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
vim-patch:9.0.0785: memory leak with empty shell command
Problem: Memory leak with empty shell command.
Solution: Free the allocated memory when bailing out.
9652249a2d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
c0f10d3fe0
commit
5b77dde8dd
@ -1015,6 +1015,7 @@ void do_bang(int addr_count, exarg_T *eap, bool forceit, bool do_in, bool do_out
|
||||
// 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) {
|
||||
xfree(newcmd);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user