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)
diff --git a/src/syntax.c b/src/syntax.c
index 154b759..2141bee 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -5222,7 +5222,7 @@
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);
diff --git a/src/version.c b/src/version.c
index c406005..156f075 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1950,
+/**/
1949,
/**/
1948,