diff src/eval.c @ 14331:f8280e1bfc84 v8.1.0181

patch 8.1.0181: memory leak with trailing characters in skip expression commit https://github.com/vim/vim/commit/a43ebe9454386427ca38c75810e2d36991f17812 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 14 17:25:01 2018 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Sat, 14 Jul 2018 17:30:05 +0200
parents c1fcfafa8d1a
children 46f14852a919
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -729,6 +729,7 @@ eval_expr_typval(typval_T *expr, typval_
 	    return FAIL;
 	if (*s != NUL)  /* check for trailing chars after expr */
 	{
+	    clear_tv(rettv);
 	    EMSG2(_(e_invexpr2), s);
 	    return FAIL;
 	}