mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0246: memory leak in globpath()
Problem: memory leak in globpath()
Solution: Free the individual allocated strings when ga_grow() fails
(Huihui Huang)
closes: #19817
Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
1578ea9d97
commit
418400075a
@@ -4219,6 +4219,11 @@ globpath(
|
||||
++ga->ga_len;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FreeWild(num_p, p);
|
||||
p = NULL;
|
||||
}
|
||||
vim_free(p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
246,
|
||||
/**/
|
||||
245,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user