mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
patch 9.1.1851: memory leak in heredoc_get()
Problem: memory leak in heredoc_get()
Solution: Free "str" if list_append_string() fails
(Lidong Yan).
In heredoc_get(), eval_all_expr_in_str() allocates a new string and
assign it to local variable "str". When list_append_string() failed
the memory pointed to by "str" leaks. Free "str" if list_append_string()
failed.
related: #18533
Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
da2dabc6f7
commit
dc75a204f1
@@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1851,
|
||||
/**/
|
||||
1850,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user