Patch 8.2.0556
Problem: Vim9: memory leak when finding common type.
Solution: Store allocated memory in type growarray.
Files: src/vim9compile.c
*** ../vim-8.2.0555/src/vim9compile.c 2020-04-12 16:38:54.775938935 +0200
--- src/vim9compile.c 2020-04-12 17:08:55.975907361 +0200
***************
*** 1823,1830 ****
*dest = alloc_func_type(common, argcount, type_gap);
if (type1->tt_args != NULL && type2->tt_args != NULL)
{
! (*dest)->tt_args = ALLOC_CLEAR_MULT(type_T *, argcount);
! if ((*dest)->tt_args != NULL)
for (i = 0; i < argcount; ++i)
common_type(type1->tt_args[i], type2->tt_args[i],
&(*dest)->tt_args[i], type_gap);
--- 1823,1830 ----
*dest = alloc_func_type(common, argcount, type_gap);
if (type1->tt_args != NULL && type2->tt_args != NULL)
{
! if (func_type_add_arg_types(*dest, argcount,
! type_gap) == OK)
for (i = 0; i < argcount; ++i)
common_type(type1->tt_args[i], type2->tt_args[i],
&(*dest)->tt_args[i], type_gap);
*** ../vim-8.2.0555/src/version.c 2020-04-12 16:38:54.775938935 +0200
--- src/version.c 2020-04-12 17:11:00.551630381 +0200
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 556,
/**/
--
People who want to share their religious views with you
almost never want you to share yours with them.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202004121511.03CFBwBk010504%40masaka.moolenaar.net.