mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -05:00
patch 9.1.1581: possible memory leak in vim9generics.c
Problem: possible memory leak in vim9generics.c
Solution: Free ret_free if ga_grow() fails and before returning
(Lidong Yan).
In parse_generic_func_type_args() at vim9generics.c, we allocate memory
in ret_name and should free it by calling vim_free(ret_free). If
ga_grow on gfatab->gfat_args failed, we forget to call vim_free(ret_free)
thus would cause a leak. Add vim_free(ret_free) before return NULL.
closes: #17821
Signed-off-by: Lidong Yan <yldhome2d2@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
13e1af7de9
commit
97194523d5
@@ -719,6 +719,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1581,
|
||||
/**/
|
||||
1580,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user