mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 17:58:18 +00:00
ex_eval: Fix memory leak
Parameter should_free, indicating that the caller has to free the returned pointer from get_exception_string(), is not set to true if type == ET_ERROR.
This commit is contained in:
@@ -378,7 +378,7 @@ char_u *get_exception_string(void *value, int type, char_u *cmdname, int *should
|
||||
char_u *p, *val;
|
||||
|
||||
if (type == ET_ERROR) {
|
||||
*should_free = FALSE;
|
||||
*should_free = true;
|
||||
mesg = ((struct msglist *)value)->throw_msg;
|
||||
if (cmdname != NULL && *cmdname != NUL) {
|
||||
size_t cmdlen = STRLEN(cmdname);
|
||||
|
Reference in New Issue
Block a user