forked from aniani/vim
patch 8.2.4668: buffer allocation failures insufficiently tested
Problem: Buffer allocation failures insufficiently tested. Solution: Add tests for memory allocation failures. (Yegappan Lakshmanan, closes #10064)
This commit is contained in:
committed by
Bram Moolenaar
parent
5018a836c0
commit
0dac1ab579
@@ -1997,7 +1997,10 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
|
||||
new_buffer = TRUE;
|
||||
buf = buflist_new(NULL, NULL, (linenr_T)0, BLN_NEW|BLN_DUMMY|BLN_REUSE);
|
||||
if (buf == NULL)
|
||||
{
|
||||
win_free_popup(wp);
|
||||
return NULL;
|
||||
}
|
||||
ml_open(buf);
|
||||
|
||||
win_init_popup_win(wp, buf);
|
||||
|
Reference in New Issue
Block a user