forked from aniani/vim
patch 8.0.1501: out-of-memory situation not correctly handled
Problem: Out-of-memory situation not correctly handled. (Coverity) Solution: Check for NULL value.
This commit is contained in:
@@ -1668,6 +1668,8 @@ yank_do_autocmd(oparg_T *oap, yankreg_T *reg)
|
||||
v_event = get_vim_var_dict(VV_EVENT);
|
||||
|
||||
list = list_alloc();
|
||||
if (list == NULL)
|
||||
return;
|
||||
for (n = 0; n < reg->y_size; n++)
|
||||
list_append_string(list, reg->y_array[n], -1);
|
||||
list->lv_lock = VAR_FIXED;
|
||||
|
@@ -771,6 +771,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1501,
|
||||
/**/
|
||||
1500,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user