Patch 8.2.1800

9 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 4, 2020, 11:25:20 AM10/4/20
to vim...@googlegroups.com

Patch 8.2.1800
Problem: Vim9: memory leak if "if" condition is invalid.
Solution: Free ppconst earlier.
Files: src/vim9compile.c


*** ../vim-8.2.1799/src/vim9compile.c 2020-10-04 16:06:00.513884339 +0200
--- src/vim9compile.c 2020-10-04 17:17:44.058727117 +0200
***************
*** 5721,5730 ****

// The expression results in a constant.
v = tv_get_bool_chk(&ppconst.pp_tv[0], &error);
if (error)
return NULL;
cctx->ctx_skip = v ? SKIP_NOT : SKIP_YES;
- clear_ppconst(&ppconst);
}
else
{
--- 5721,5730 ----

// The expression results in a constant.
v = tv_get_bool_chk(&ppconst.pp_tv[0], &error);
+ clear_ppconst(&ppconst);
if (error)
return NULL;
cctx->ctx_skip = v ? SKIP_NOT : SKIP_YES;
}
else
{
*** ../vim-8.2.1799/src/version.c 2020-10-04 16:16:50.919838655 +0200
--- src/version.c 2020-10-04 17:19:12.698507185 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1800,
/**/

--
hundred-and-one symptoms of being an internet addict:
29. Your phone bill comes to your doorstep in a box.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages