aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharlie Groves <charlie.groves@gmail.com>2022-04-15 21:58:48 -0400
committerGitHub <noreply@github.com>2022-04-16 09:58:48 +0800
commit3f2e9298bdd971a4d2baa298aff7c6f2c2c1ad1a (patch)
treebe6e061e0f4d697d54f861aa6403da5695c92258 /src
parent08a144912ce2d7df73c77a42a81c8f29a476856c (diff)
downloadrneovim-3f2e9298bdd971a4d2baa298aff7c6f2c2c1ad1a.tar.gz
rneovim-3f2e9298bdd971a4d2baa298aff7c6f2c2c1ad1a.tar.bz2
rneovim-3f2e9298bdd971a4d2baa298aff7c6f2c2c1ad1a.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 4948e2bb69..4d914acea4 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -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);