summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-07-14 17:25:01 +0200
committerBram Moolenaar <Bram@vim.org>2018-07-14 17:25:01 +0200
commita43ebe9454386427ca38c75810e2d36991f17812 (patch)
tree54a2de5b033352d0526495a34d67e3186c54291f /src/eval.c
parentd6ef5f9b3d3df2d5dcc666c8741e99fcc77043f6 (diff)
patch 8.1.0181: memory leak with trailing characters in skip expressionv8.1.0181
Problem: Memory leak with trailing characters in skip expression. Solution: Free the return value.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 26aa0e34e7..4423419b17 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -729,6 +729,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
return FAIL;
if (*s != NUL) /* check for trailing chars after expr */
{
+ clear_tv(rettv);
EMSG2(_(e_invexpr2), s);
return FAIL;
}