mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
Replace alloc() with xmalloc() and remove immediate OOM checks
This commit is contained in:
@@ -5263,7 +5263,7 @@ int match_add(win_T *wp, char_u *grp, char_u *pat, int prio, int id)
|
||||
}
|
||||
|
||||
/* Build new match. */
|
||||
m = (matchitem_T *)alloc(sizeof(matchitem_T));
|
||||
m = xmalloc(sizeof(matchitem_T));
|
||||
m->id = id;
|
||||
m->priority = prio;
|
||||
m->pattern = vim_strsave(pat);
|
||||
|
Reference in New Issue
Block a user