mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
vim-patch:8.0.0648: possible use of NULL pointer
Problem: Possible use of NULL pointer if buflist_new() returns NULL.
(Coverity)
Solution: Check for NULL pointer in set_bufref().
fadacf01d0
This commit is contained in:
@@ -343,7 +343,7 @@ open_buffer (
|
||||
void set_bufref(bufref_T *bufref, buf_T *buf)
|
||||
{
|
||||
bufref->br_buf = buf;
|
||||
bufref->br_fnum = buf->b_fnum;
|
||||
bufref->br_fnum = buf == NULL ? 0 : buf->b_fnum;
|
||||
bufref->br_buf_free_count = buf_free_count;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user