0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2018-07-14 17:25:01 +02:00
parent d6ef5f9b3d
commit a43ebe9454
3 changed files with 13 additions and 0 deletions

View File

@@ -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;
}