forked from aniani/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.
This commit is contained in:
parent
b99e6e6c5f
commit
9652249a2d
@ -960,7 +960,10 @@ do_bang(
|
||||
// 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;
|
||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
785,
|
||||
/**/
|
||||
784,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user