mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.0033: make_extmatch() OOM #11602
Problem: Crash when make_extmatch() runs out of memory.
Solution: Check for NULL. (Dominique Pelle, closs vim/vim#5392)
7c77b34967
This commit is contained in:
parent
2ef72437fc
commit
7dacab9afd
@ -3575,6 +3575,7 @@ theend:
|
|||||||
* Create a new extmatch and mark it as referenced once.
|
* Create a new extmatch and mark it as referenced once.
|
||||||
*/
|
*/
|
||||||
static reg_extmatch_T *make_extmatch(void)
|
static reg_extmatch_T *make_extmatch(void)
|
||||||
|
FUNC_ATTR_NONNULL_RET
|
||||||
{
|
{
|
||||||
reg_extmatch_T *em = xcalloc(1, sizeof(reg_extmatch_T));
|
reg_extmatch_T *em = xcalloc(1, sizeof(reg_extmatch_T));
|
||||||
em->refcnt = 1;
|
em->refcnt = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user