1
0
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:
Yegappan Lakshmanan
2022-04-02 21:46:19 +01:00
committed by Bram Moolenaar
parent 5018a836c0
commit 0dac1ab579
7 changed files with 84 additions and 6 deletions

View File

@@ -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);