mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:45:12 -04:00
patch 8.1.1950: using NULL pointer after an out-of-memory
Problem: Using NULL pointer after an out-of-memory. Solution: Check for NULL pointer. (Dominique Pelle, closes #4881)
This commit is contained in:
parent
8c6173c7d3
commit
4bbfb0f3cc
@ -5222,7 +5222,7 @@ syn_cmd_region(
|
||||
for (item = ITEM_START; item <= ITEM_END; ++item)
|
||||
for (ppp = pat_ptrs[item]; ppp != NULL; ppp = ppp_next)
|
||||
{
|
||||
if (!success)
|
||||
if (!success && ppp->pp_synp != NULL)
|
||||
{
|
||||
vim_regfree(ppp->pp_synp->sp_prog);
|
||||
vim_free(ppp->pp_synp->sp_pattern);
|
||||
|
@ -761,6 +761,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1950,
|
||||
/**/
|
||||
1949,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user