From 4bbfb0f3cc67c00c8cee4e47283e8d760025219d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 31 Aug 2019 15:28:02 +0200 Subject: [PATCH] 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) --- src/syntax.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/syntax.c b/src/syntax.c index 154b75954..2141beeaf 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -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); diff --git a/src/version.c b/src/version.c index c40600508..156f07513 100644 --- a/src/version.c +++ b/src/version.c @@ -761,6 +761,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1950, /**/ 1949, /**/ -- 2.50.1