aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Zhukov <dmzhukov@outlook.com>2024-01-26 23:36:48 +0400
committerDaniil Zhukov <dmzhukov@outlook.com>2024-01-26 23:36:48 +0400
commit6f49ed58c3d87ed8632ac84822173811a1a6ee3f (patch)
tree59767f25ab81461d795930d0c2809a60c1de4d91
parenta9df0c5ce6caa5e623c3140a80baf4b3c1ce07db (diff)
downloadrneovim-6f49ed58c3d87ed8632ac84822173811a1a6ee3f.tar.gz
rneovim-6f49ed58c3d87ed8632ac84822173811a1a6ee3f.tar.bz2
rneovim-6f49ed58c3d87ed8632ac84822173811a1a6ee3f.zip
fix(coverity/348240): memory leak in put_view()
-rw-r--r--src/nvim/ex_session.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c
index 3e15641be8..fb37bc86f1 100644
--- a/src/nvim/ex_session.c
+++ b/src/nvim/ex_session.c
@@ -366,6 +366,7 @@ static int put_view(FILE *fd, win_T *wp, int add_edit, unsigned *flagp, int curr
if (put_line(fd, "enew | setl bt=help") == FAIL
|| fprintf(fd, "help %s", curtag) < 0 || put_eol(fd) == FAIL) {
+ xfree(fname_esc);
return FAIL;
}
} else if (wp->w_buffer->b_ffname != NULL