mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
chore: remove vestigial sfname freeing (#18123)
This freeing is necessary in Vim since the alloc can fail. Since we're using xcalloc, that's not possible and the freeing will never run.
This commit is contained in:
parent
08a144912c
commit
3f2e9298bd
@ -1775,19 +1775,6 @@ buf_T *buflist_new(char_u *ffname_arg, char_u *sfname_arg, linenr_T lnum, int fl
|
||||
clear_wininfo(buf);
|
||||
buf->b_wininfo = xcalloc(1, sizeof(wininfo_T));
|
||||
|
||||
if (ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL)) {
|
||||
if (buf->b_sfname != buf->b_ffname) {
|
||||
XFREE_CLEAR(buf->b_sfname);
|
||||
} else {
|
||||
buf->b_sfname = NULL;
|
||||
}
|
||||
XFREE_CLEAR(buf->b_ffname);
|
||||
if (buf != curbuf) {
|
||||
free_buffer(buf);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (buf == curbuf) {
|
||||
// free all things allocated for this buffer
|
||||
buf_freeall(buf, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user