mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
vim-patch:8.1.1950: using NULL pointer after an out-of-memory (#10902)
Problem: Using NULL pointer after an out-of-memory.
Solution: Check for NULL pointer. (Dominique Pelle, closes vim/vim#4881)
4bbfb0f3cc
This commit is contained in:
parent
25e0a449bb
commit
e29b89ca54
@ -4683,7 +4683,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);
|
||||
xfree(ppp->pp_synp->sp_pattern);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user