aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-21 20:46:43 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-23 18:17:08 -0400
commitf0d6695e7cc13cd5f1ee006575a369faf2546893 (patch)
treef6405cd5c7dda13a43418789a13dfb4d10f2faea /src/nvim/eval.c
parent6eae28f090b694282bed37fb73e547b34dc3261d (diff)
downloadrneovim-f0d6695e7cc13cd5f1ee006575a369faf2546893.tar.gz
rneovim-f0d6695e7cc13cd5f1ee006575a369faf2546893.tar.bz2
rneovim-f0d6695e7cc13cd5f1ee006575a369faf2546893.zip
vim-patch:8.1.0181: memory leak with trailing characters in skip expression
Problem: Memory leak with trailing characters in skip expression. Solution: Free the return value. https://github.com/vim/vim/commit/a43ebe9454386427ca38c75810e2d36991f17812
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 3c50647848..3e6e183847 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -991,6 +991,7 @@ static int eval_expr_typval(const typval_T *expr, typval_T *argv,
return FAIL;
}
if (*s != NUL) { // check for trailing chars after expr
+ tv_clear(rettv);
emsgf(_(e_invexpr2), s);
return FAIL;
}