mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.0556: Vim9: memory leak when finding common type
Problem: Vim9: memory leak when finding common type. Solution: Store allocated memory in type growarray.
This commit is contained in:
@@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
556,
|
||||||
/**/
|
/**/
|
||||||
555,
|
555,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1823,8 +1823,8 @@ common_type(type_T *type1, type_T *type2, type_T **dest, garray_T *type_gap)
|
|||||||
*dest = alloc_func_type(common, argcount, type_gap);
|
*dest = alloc_func_type(common, argcount, type_gap);
|
||||||
if (type1->tt_args != NULL && type2->tt_args != NULL)
|
if (type1->tt_args != NULL && type2->tt_args != NULL)
|
||||||
{
|
{
|
||||||
(*dest)->tt_args = ALLOC_CLEAR_MULT(type_T *, argcount);
|
if (func_type_add_arg_types(*dest, argcount,
|
||||||
if ((*dest)->tt_args != NULL)
|
type_gap) == OK)
|
||||||
for (i = 0; i < argcount; ++i)
|
for (i = 0; i < argcount; ++i)
|
||||||
common_type(type1->tt_args[i], type2->tt_args[i],
|
common_type(type1->tt_args[i], type2->tt_args[i],
|
||||||
&(*dest)->tt_args[i], type_gap);
|
&(*dest)->tt_args[i], type_gap);
|
||||||
|
Reference in New Issue
Block a user