mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0134: memory leak in socket_server_send_reply()
Problem: memory leak in socket_server_send_reply() in src/os_unix.c
Solution: Free final in the error case when returning early
(Huihui Huang).
closes: #19627
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
248de84d86
commit
ede5252d89
@@ -9778,6 +9778,7 @@ socket_server_send_reply(char_u *client, char_u *str)
|
||||
socket_server_write(socket_fd, final, sz, 1000) == FAIL)
|
||||
{
|
||||
socket_server_free_cmd(&cmd);
|
||||
vim_free(final);
|
||||
close(socket_fd);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
134,
|
||||
/**/
|
||||
133,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user