comparison 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
comparison
equal deleted inserted replaced
14330:8147db89583c 14331:f8280e1bfc84
727 s = skipwhite(s); 727 s = skipwhite(s);
728 if (eval1(&s, rettv, TRUE) == FAIL) 728 if (eval1(&s, rettv, TRUE) == FAIL)
729 return FAIL; 729 return FAIL;
730 if (*s != NUL) /* check for trailing chars after expr */ 730 if (*s != NUL) /* check for trailing chars after expr */
731 { 731 {
732 clear_tv(rettv);
732 EMSG2(_(e_invexpr2), s); 733 EMSG2(_(e_invexpr2), s);
733 return FAIL; 734 return FAIL;
734 } 735 }
735 } 736 }
736 return OK; 737 return OK;