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:
Huihui Huang
2026-03-10 19:40:33 +00:00
committed by Christian Brabandt
parent 248de84d86
commit ede5252d89
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -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;
}
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
134,
/**/
133,
/**/