commit 6f49ed58c3d87ed8632ac84822173811a1a6ee3f
parent a9df0c5ce6caa5e623c3140a80baf4b3c1ce07db
Author: Daniil Zhukov <dmzhukov@outlook.com>
Date: Fri, 26 Jan 2024 23:36:48 +0400
fix(coverity/348240): memory leak in put_view()
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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