From 5ff2ea66873dc0bcd1921158a93e363f009b245d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 31 Aug 2022 07:24:16 +0800 Subject: vim-patch:8.2.0301: insufficient testing for exception handling (#20016) Problem: Insufficient testing for exception handling and the "attention" prompt. Solution: Add test cases. (Yegappan Lakshmanan, closes vim/vim#5681) https://github.com/vim/vim/commit/b654103ad1e379348616f354272db86804ab4bdb Fix memory leak from last char_u refactor. --- src/nvim/eval/userfunc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/eval/userfunc.c') diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 1f94f9c2b7..4be922a055 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -3111,8 +3111,7 @@ char *get_return_cmd(void *rettv) char *tofree = NULL; if (rettv != NULL) { - tofree = encode_tv2echo((typval_T *)rettv, NULL); - s = encode_tv2echo((typval_T *)rettv, NULL); + tofree = s = encode_tv2echo((typval_T *)rettv, NULL); } if (s == NULL) { s = ""; -- cgit