diff options
author | oni-link <knil.ino@gmail.com> | 2016-03-05 20:46:59 +0100 |
---|---|---|
committer | oni-link <knil.ino@gmail.com> | 2016-03-05 20:46:59 +0100 |
commit | 2ea02ff635d255232172a31345f8d169a0f0e343 (patch) | |
tree | 70295787ed6490acf18200e8899e8eb9e2f276d8 | |
parent | 0e9f7a7b36901842d9cdbe8cd00db47b74ab799b (diff) | |
download | rneovim-2ea02ff635d255232172a31345f8d169a0f0e343.tar.gz rneovim-2ea02ff635d255232172a31345f8d169a0f0e343.tar.bz2 rneovim-2ea02ff635d255232172a31345f8d169a0f0e343.zip |
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.
-rw-r--r-- | src/nvim/ex_eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index bf67047ae8..a1e54e74a6 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -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); |