mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0624: leaking argument type array
Problem: Leaking argument type array. Solution: Add allocated memory to type_gap.
This commit is contained in:
parent
fa1039760e
commit
ac38ec7c7f
@ -699,6 +699,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 */
|
||||||
|
/**/
|
||||||
|
624,
|
||||||
/**/
|
/**/
|
||||||
623,
|
623,
|
||||||
/**/
|
/**/
|
||||||
|
@ -58,13 +58,10 @@ copy_type(type_T *type, garray_T *type_gap)
|
|||||||
return type;
|
return type;
|
||||||
*copy = *type;
|
*copy = *type;
|
||||||
|
|
||||||
if (type->tt_args != NULL)
|
if (type->tt_args != NULL
|
||||||
{
|
&& func_type_add_arg_types(copy, type->tt_argcount, type_gap) == OK)
|
||||||
copy->tt_args = ALLOC_MULT(type_T *, type->tt_argcount);
|
for (int i = 0; i < type->tt_argcount; ++i)
|
||||||
if (copy->tt_args != NULL)
|
copy->tt_args[i] = type->tt_args[i];
|
||||||
for (int i = 0; i < type->tt_argcount; ++i)
|
|
||||||
copy->tt_args[i] = type->tt_args[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user