mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0056: memory leak in ex_substitute
Problem: memory leak in ex_substitute Solution: Free the variable (Huihui Huang) fixes: #19501 closes: #19506 Signed-off-by: Huihui Huang <625173@qq.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
9c3279ddc3
commit
6a239a1905
@@ -4130,8 +4130,11 @@ ex_substitute(exarg_T *eap)
|
||||
vim_free(old_sub);
|
||||
old_sub = vim_strsave(sub);
|
||||
if (old_sub == NULL)
|
||||
{
|
||||
// out of memory
|
||||
vim_free(sub);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
56,
|
||||
/**/
|
||||
55,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user